Custom Fields
Re-Envisioned
Support Meta Box Conditional Logic How to hide field in the meta box by post type?

  • Creator
    Topic
  • #18213
    Resolved Przemek
    Participant

    There’s a list of available post-related params for conditions in documentation:

    Param        Description
    post_ID     Post ID
    page_template   Page template
    parent_id   Parent post ID
    post_format Post format

    Could you consider adding post_type parameter there?

    Or there’s a different approach to manage a field visibility based on post type?

    I have the same meta box registered for 2 different post types but I’d like to hide some fields in one of them.

    Thank you.

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #18244
    Anh Tran
    Keymaster

    Hi,

    We don’t have that condition at the moment. But you can do that with custom callback.

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