Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #20570

    Hi !

    I extended the Metabox Section of the Angular Portfolio on using the given filters:

    add_filter ( 'avia_metabox_filter', 'my_avia_metabox_filter');
    add_filter ( 'avia_metabox_element_filter', 'my_avia_metabox_element_filter');

    function my_avia_metabox_filter($boxes)
    {

    $boxes[] = array(
    'title' => "Buttons",
    'id' => "buttons" ,
    'page' => array('portfolio'),
    'context' => "side",
    'priority' => "low"
    );

    return ($boxes);

    }

    function my_avia_metabox_element_filter($elements)
    {

    $elements[] = array(
    'slug' => "buttons",
    'name' => "SOLD Button Color",
    'desc' => "",
    'id' => "sold_button",
    'type' => "colorpicker",
    'class' => "av_2columns av_col_2",
    'std' => "#ffffff",
    );

    $elements[] = array(
    'slug' => "buttons",
    'name' => "UNDER OFFER Button Color",
    'desc' => "",
    'id' => "underoffer_button",
    'type' => "colorpicker",
    'class' => "av_2columns av_col_2",
    'std' => "#ffffff",
    );

    return ($elements);

    }

    But at the Backend this doesn’t looks nice. Looks like that the Elements are not assigned to the box. I have a screenshot if you neet.

    #108147

    Try removing the class variable?

    ‘class’ => “av_2columns av_col_2″,

    to

    ‘class’ => “”,

    #108148

    Many thanks. This works.

    #108149

    Hey!

    slackbladder thanks for helping us out :)

    Best regards,

    Peter

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Filter to extend Metaboxes doesn't work ??’ is closed to new replies.