Include for only posts with category isn't working

Support MB Include Exclude Include for only posts with category isn't working

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #3788
    chimovskichimovski
    Participant

    Hi,

    I seem to be having trouble with including metaboxes on a specific category only. I want to be able to show the metabox on posts with the category ID of 94. But it just shows up on all posts. Code is below. Am I doing something wrong?

    // Events Posts –  /////////////////
    $meta_boxes[] = array(
    	// Meta box id, UNIQUE per meta box. Optional since 4.1.5
    	'id' => 'current_event_id',
    	// Meta box title - Will appear at the drag and drop handle bar. Required.
    	'title' => __( 'Current Event Extra content', 'rwmb' ),
    	// Post types, accept custom post types as well - DEFAULT is array('post'). Optional.
    	'pages' => array( 'post' ),
    	// 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,
    	// Register this meta box for posts matched below conditions
    	'include' => array(
    		'category'  => array( 94 )
    		),
    	// List of meta fields
    	'fields' => array(
    	// TEXT
    		array(
    			// Field name - Will be used as label
    			'name'  => __( 'Ribbon Text', 'meta-box' ),
    			// Field ID, i.e. the meta key
    			'id'    => "{$prefix}event-ribbon-text",
    			// Field description (optional)
    			'desc'  => __( 'Enter text for the ribbon e.g Date of event', 'meta-box' ),
    			'type'  => 'text',
    		),
    	),
    
    );
    #3796
    Anh TranAnh Tran
    Keymaster

    Hmm, it seems to work for me. Which version of the extension are you using?

    #3797
    chimovskichimovski
    Participant

    I'm running latest I think:

    Metabox 4.8.7
    Meta-box-include-exclude 1.0.4

    I also have metabox group installed 1.1.3

    thanks

    #3800
    Anh TranAnh Tran
    Keymaster

    Just figured out the bug and released a fix. Please update the extension.

    #3801
    chimovskichimovski
    Participant

    Awesome, working perfectly now. Thank you so much.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Include for only posts with category isn't working’ is closed to new replies.