Not working!

Support MB Include Exclude Not working!

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2524
    bowenacbowenac
    Participant

    Just purchased this extension and can't get it to work.
    Here is an example of a meta box. I want this to show up on the default page template, as well as a custom post type that uses single-projects.php not sure if that is how I would go about using it on custom post types, but it's also not showing up on default pages.

    	$meta_boxes[] = array(
    		// Meta box id, UNIQUE per meta box. Optional since 4.1.5
    		'id' => 'project_images',
    
    		// Meta box title - Will appear at the drag and drop handle bar. Required.
    		'title' => __( 'Additional Images', 'meta-box' ),
    
    		'include' => array(
    			// List of page templates. Can be array or comma separated. Optional.
    			'relation' => 'OR',
            	'template' => array( 'page.php', 'single-projects.php' ),
    		),
    
    		// Post types, accept custom post types as well - DEFAULT is array('post'). Optional.
    		'post_types' => 'page',
    
    		// Where the meta box appear: normal (default), advanced, side. Optional.
    		'context' => 'normal',
    
    		// Order of meta box: high (default), low. Optional.
    		'priority' => 'high',
    
    		// Auto save: true, false (default). Optional.
    		'autosave' => true,
    
    		// List of meta fields
    		'fields' => array(
    			// IMAGE ADVANCED (WP 3.5+)
    			array(
    				'name'             => __( 'Image Advanced Upload', 'meta-box' ),
    				'id'               => "{$prefix}imgadv",
    				'type'             => 'image_advanced',
    			),
    		),	
    	);
    #2525
    bowenacbowenac
    Participant

    Exclude is working though, so I guess I will just use that approach.

    #2535
    Anh TranAnh Tran
    Keymaster

    Glad that it works for you. FYI: the rules are not applied for "default" page template as WP actually saves nothing to page info if it has default page template. So I think the "exclude" is the best approach here.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Not working!’ is closed to new replies.