Support » Fixing WordPress » Taxonomies for specific pages

  • 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 for the children of a certain parent page. So if I had product type A, I would want all those child pages(products) to have the taxonomy and a meta box.

    The line that has


    places this in my custom post type in the admin.

    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
    		array('label' => __( 'Landing Pages Categories' ), 'sort' => true, 'args' => array( 'orderby' => 'term_order' ), 'rewrite' => array( 'slug' => 'category-news-room' ), 'hierarchical' => true )
Viewing 1 replies (of 1 total)
  • Still trying to figure this out… is there another section on the forums that I could post this question or am I in the right area?

Viewing 1 replies (of 1 total)
  • The topic ‘Taxonomies for specific pages’ is closed to new replies.