Taxonomy Meta Box

Community Forums Forums General Discussion Taxonomy Meta Box

This topic is: not resolved

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  devongroup 8 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #70301

    devongroup
    Participant
    Post count: 18

    Hello the below code registers a taxonomy and causes the meta box to show only when in that taxonomy in the wordpress admin.

    My question is how to register a new taxonomy but have it only display the meta box in the admin for the children of a certain parent page.

    The line that has ‘landing pages’ restricts the meta box for this taxonomy to the custom post type of Landing_Pages. The only other 2 options I know of are ‘post’ and ‘page’ but again I want to restrict the taxonomy meta box to just the children of a certain parent.

    Another question is there a way to set an array so I can target post, page and a CPT? Curios how flexible the wordpress taxonomies are.

    Let me know if I am not being clear.

    /* Landing Pages Categories Taxonomy */
    add_action( ‘init’, ‘landing_pages_cats’ );
    function landing_pages_cats() { // Landing Pages Categories
    register_taxonomy(
    ‘landingpagescats’,
    ‘landing_pages’,
    array(‘label’ => __( ‘Landing Pages Categories’ ), ‘sort’ => true, ‘args’ => array( ‘orderby’ => ‘term_order’ ), ‘rewrite’ => array( ‘slug’ => ‘category-news-room’ ), ‘hierarchical’ => true )
    );
    }

    #90404

    Susan
    Moderator
    Post count: 9255

    As it has been a while since you posted your question, I hope you were able to get your issue resolved.

    If not, report back here, and I will escalate for you. Thanks!


    Susan @ Graphically Designing I offer theme customizations I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

    #91405

    devongroup
    Participant
    Post count: 18

    Still searching for a solution!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.