• Creator
    Topic
  • #926
    PixArt
    Participant

    Hello, Is there possibilty to hide metabox if page is child or parent?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #943
    PixArt
    Participant

    Anyone can help??

    #948
    Anh Tran
    Keymaster

    Hi PixArt, sorry for late reply. I’ve just back from honeymoon.

    In latest version of Meta Box Show/Hide, there’s a new option input_value, which allows us to show/hide meta boxes based on value of an input (select dropdown, checkbox, etc.). You can use that to show/hide meta boxes when it’s a parent/child page, like this:

    'input_value' => array(
        '#parent_id' => '', // For child page
        // '#parent_id' => 227, // For parent page, where 227 is parent page ID
    )

    Please let me know if it works for you.

    #1016
    Anh Tran
    Keymaster

    FYI, the latest version of Meta Box Show Hide now supports check for is_child. Please try it out!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘If is parent?’ is closed to new replies.

Newsletter

Subscribe to our newsletter to receive news and tutorials for Meta Box and WordPress.


grid gear info copy caret-up caret-down trash