Meta box visible on certain page?

Support MB Conditional Logic Meta box visible on certain page?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1025
    Cristian D.Cristian D.
    Participant

    Hi,
    Is there possibilty to put visible a metabox if page is child or parent or in certain page?
    Thanks

    #1026
    Tan NguyenTan Nguyen
    Participant

    Hi Cristian,

    Thanks for using MB Conditional Logic.

    Conditional Logic can works with any DOM element, so you can set the visibility for meta box if page is child or parent. This is some usage example:

    Visible when the page is parent (root)

    
    'visible' => array('parent_id', '')
    

    Visible when the page is child

    
    'visible' => array('parent_id', '!=', '')
    

    Visible when the page's parent ID is 99

    
    'visible' => array('parent_id', 99)
    

    Visible in certain page (ID > 101 for example):

    
    'visible' => array('post_ID', '>', 101)
    

    These examples above uses visible action, you can use hidden action in case you want to hide it.

    Regards.

    #1028
    Cristian D.Cristian D.
    Participant

    Awesome!
    Thank you!

    #1029
    Tan NguyenTan Nguyen
    Participant

    You're welcome, and please don't hesitate to tell us if you have problem.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Meta box visible on certain page?’ is closed to new replies.