Custom Fields
Re-Envisioned
Support Meta Box Include Exclude Include/Exclude broken with update

  • Creator
    Topic
  • #18926
    Resolved chillifish
    Participant

    I have just updated Meta Box to 5.2.8 and fields using ‘include’ are no longer appearing. code below:

     $meta_boxes[] = array(
    
            'id'          => $prefix . 'home_header_img',
            'title'           => esc_html__( 'Header image', 'textdomain' ),
            'description' => esc_html__( 'Appears above the page title above main copy', 'textdomain' ),
            'post_types'  => array( 'post', 'page' ),
            'context'     => 'normal',
            'priority'        => 'high',
    
            'include' => array(
                'template' => array( 'page-templates/template-home.php' ),
            ),
    
            'fields'     => array(
                array(
                    'name'                => esc_html__( 'Image', 'textdomain' ),
                    'id'              =>  $prefix . "header_img",
                    'desc'                => esc_html__( 'Appears above the page title above main copy', 'textdomain' ),
                    'type'                => 'image_advanced',
                ),
            ),
        );

    If I remove the include bit, the boxes appear:

         'include' => array(
                'template' => array( 'page-templates/template-home.php' ),
            ),
    
Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #18927
    chillifish
    Participant

    Apologies, it seems the template file names have been changed, so problem solved. Can’t see how to delete the post.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
grid gear info copy caret-up caret-down trash