Not showing on specified template

Support MB Show Hide Not showing on specified template

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #14169
    Vladimir MujakovicVladimir Mujakovic
    Participant

    I am attempting to show a metabox only on a specified template, I have added the code as shown in the demo, but the metabox will not show under any conditions.

    $meta_boxes[] = array( 
        'title' => esc_html__( 'Carousel', 'metabox-online-generator' ),
        'pages' => array('page'),
        'show' => array(
            'template' => array('../templates/page-product-tech-template.php'),
        ),
        'fields' => array();
    );

    The file I am targeting is in the adjacent folder. So when i'm specifying the path I am backing out once and entering the templates directory, is this correct?

    #14178
    Anh TranAnh Tran
    Keymaster

    Hi Vladimir,

    Please set the template to the path of the template file, without .., e.g. templates/page-product-tech-template.php.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.