A way of arranging items where an item can be a parent or child of another. Categories are an example of a hierarchical taxonomy.

learn more… | top users | synonyms

0
votes
0answers
20 views

Custom while loop for hierarchical display of a taxonomy

I'm trying to build an automated mega menu that loops through all product-category terms and displays them in a hierarchical underscored list, as well as including post in each term. For example, ...
0
votes
0answers
12 views

Get all categories (ids) in array with hierarchy

How we can retrieve all categories into one array with only ids. And it should be hierarchical. I don't find similar API function...
4
votes
7answers
20k views

Get the the top-level parent of a custom taxonomy term

How would I get the top-level parent of a given term? I am using wp_get_object_terms to get taxonomy terms on posts, but instead of showing all tagged terms, I only want to show tagged terms' ...
0
votes
1answer
43 views

Add search to 'Parent' dropdown

I created a product catalog from custom post type pages. I used it's hierarchy to make menus and submenus. It looked like a great idea at a time... But now this catalog grew in size and it's very ...
1
vote
0answers
12 views

Get the taxonomy of a post hierarchically

I would like to get all the taxonomy of one post (in a loop), hierarchically. Example I have those taxonomies, and the ID of the tax in bracket. Tax1(1) -Tax2(3) --Tax3(2) I would like to gather ...
0
votes
1answer
461 views

Hierarchical permalink structure for posts showing categories and sub-categories

I'm having a lot of trouble finding an aswer to this. This is what happens to my permalink structure currently: When I open the page, filtering all posts for a category, the url is: ...
1
vote
2answers
512 views

Custom post type / taxonomy rewrite archive page 2 gives 404

I've followed the code based off this and everything is working perfectly -How to create a permalink structure with custom taxonomies and custom post types like ...
16
votes
9answers
17k views

How to show a hierarchical terms list?

I have a hierarchical taxonomy called 'geographical locations'. It contains continents on a first level, and then the countries for each one. Example : Europe - Ireland - Spain - Sweden Asia - Laos - ...
1
vote
1answer
38 views

Custom Post Type / Two level deep taxonomy (cat. and subcat.) uri problem (error 404)

I've created a CPT named "decoration products"(productos decoración), the problem concerns to it CPT. When for the first time I created "decoration products" CPT, I realized that it needed two level ...
0
votes
1answer
17 views

Populating dropdown menu with hierarchical taxonomies

Im currently populating my <select> elements (I've got plenty of them) with nested foreach loops, get_terms() and &nbsp;&nbsp;&nbsp;&nbsp; to create padding for each nested child ...
0
votes
0answers
31 views

How to create child pages from given parent page

I have a website with lots of pages and subpages. Browsing the default pages table is ok, but not very practical for sub-page creation. I first tried the plugin Nested Pages, which works fine for ...
0
votes
2answers
61 views

(get_post_ancestors == 2) is returning true on 1 as well?

I am trying to use this code: <?php if(count(get_post_ancestors($post->ID)) == 2 ) : ?> <script>...</script> <?php endif ?> to add a script to a page but only if ...
0
votes
1answer
19 views

Custom Post Type categories at edit post not hierarchical

I have created a custom post type and added a custom taxonomy like this: register_taxonomy( 'categories', 'ph_products', array( 'hierarchical' => true, ...
0
votes
1answer
37 views

Get count for all terms inside a parent term

I am trying to get the post count for a term and it's child terms. I tried it with pad_count=> true but this seems to have no effect. My term stucture is like the following: - term 1: 10 posts - ...
0
votes
0answers
34 views

How can I use previous and next posts links for each SET of children in a custom post type?

I have a custom post type set up with the Custom Post Type UI plugin called 'Exhibitions'. There is a parent post for each exhibition (eg: Exhibition 2011, Exhibition 2012) and under each is a number ...
1
vote
1answer
53 views

Display custom post type in hierarchical order with get_terms

How can I display a custom post type of products with a custom taxonomy (product category) in a list, in hierarchical order? I'd like to get them in this order: h3.parentcategory 1 ...
0
votes
2answers
755 views

How to query for posts (in hierarchical custom post type) that have children?

I'm trying to figure out how to query for posts in my hierarchical custom post type, presumably using WP_Query that have child posts. I can get all pages that don't have children by setting ...
1
vote
1answer
27 views

How WordPress manages nested dropdown?

I made a hierarchical CPT, so it involves various depths. I need to make a dropdown, and I found wp_dropdown_pages(). But for some reasons, at last I made my own dropdown querying get_pages() and ...
4
votes
2answers
184 views

set a CPT as parent of a page

I have a custom post type called Event which is registered like this: add_action('init', 'register_custom_post_types'); function register_custom_post_types() { $event_capabilities = array( ...
0
votes
1answer
57 views

Templates for hierarchical custom post type

I'm a bit confused with templates for custom post types defined as hierarchical. I've got a CPT set to hierarchical, not strictly in order to have a nested hierarchy, but so that they can be ordered ...
0
votes
1answer
246 views

How can I set the first link in my nav menu to simply be a drop-down to some other pages

I want to have a set of ~3 pages in a subdirectory called "about" example.com/about/history example.com/about/program example.com/about/coaches I don't want any about/index.html page, I just want ...
0
votes
0answers
11 views

Hierarcy question

This question is related to "Integrating a custom post type into a page hierarchy" but some what different due to scenario of things happening So suppose I'm creating a site which combines a ...
0
votes
2answers
1k views

get parent content inside child posts

I have a custom post type where I've created 3 pages in a parent-child relationship. The pages are created like this : PARENT-CHILD-GRANDCHILD I want the child and the grandchild pages to get the ...
3
votes
2answers
2k views

page title, parent tilte and grand parent title

I am using a page hierarchy and I want to show the title of the parents and grand parents page (if there is any). The structure is something like Startpage Startpage > Second page Startpage > ...
1
vote
0answers
38 views

Custom Post Types hierarchy and rewrite

I've been around this problem for 2 days, googling and experimenting with no avail. I have this Custom Post Type name "programas", and a page with the same name. The page "Programas" lists all the ...
0
votes
0answers
15 views

Get name of child custom taxonomy

I had a list of custom taxonomy: Products > Spanish products > single hair > the product A How can I get the name of Spanish products custom taxonomy?
0
votes
1answer
68 views

Display only subcategories of a category and not sub-subcategories

I have next code and i cant get it to list only the subcategories of a category and not sub-subcategories of the category. I think the problem is the next line 'hierarchical' => 0, Do you ...
0
votes
1answer
2k views

List child terms and posts in the current term

With this code parent term page lists all the child terms and the child term page lists all of the posts in current term, and the single page lists a big flat list of terms(hierarchical). Now, The ...
2
votes
5answers
3k views

How to get parents of custom taxonomy, as what get_category_parents() do?

I have a custom taxonomy 'portfolio category', while i need to show all hierarchy categories of a portfolio post, for example the post is under topcat -> childcat -> yetchildcat, i want to show ...
0
votes
0answers
23 views

Rewrite URL of a page which is child of a Custom Post Type

With the plugin Types I've created a hierarchical custom post type "journeys", and then I set that normal "pages" are child of "journeys". I've created a "journeys" post called "My First Journey". ...
0
votes
1answer
72 views

SEO Title Tag and Meta Description for custom taxonomy

I have hierarchical taxonomy called "Location" e.g. mywebsite.com/location/state/city I want mywebsite.com/location/state and mywebsite.com/location/state/city to have different title tag I want them ...
0
votes
2answers
2k views

get_the_category listing in hierarchial order

Hello at the moment I'm wondering how I would be able to make this work to post in Hierarchical order within the post loop. <?php foreach ((get_the_category()) as $childcat) { ...
1
vote
3answers
1k views

how to get the categories for a single post in a hierarchical way

The question is simple. Imagine that I have a post named 'Single Post' which is inside the category 'sub-cat' which is a child of 'parent-cat' which is a child of 'super-cat'. What I need to do is to ...
0
votes
1answer
657 views

How to get Next/previous_post_link to go through articles in top parent category

I have a magazine format where a parent category is an issue, sub categories are the sections and the articles go into their respective sections. When viewing an article in a magazine, I would like to ...
0
votes
0answers
186 views

Count posts of child category in parent category

Hallo Wordpress Comunity, I need your help. I have a Woocommerce shop site with multiple authors. In the sidebar I want to display a list of woocommerce product categories by author (based on posts ...
3
votes
2answers
657 views

How To Limit Hierarchical Pages Depth (For Custom Post Types) To Children Only

Is there a way to limit the creation of pages (custom post type) to a specific depth - e.g. level 1 (where 0 = parent, 1 = child, 2 = grand-child, etc.)? For example, let's create a 'Summer' recipe ...
0
votes
1answer
52 views

How to Create Hierarchical Directory for Nation Wide Mental Health Services

I'm to build a hierarchical directory for an online portal of nation wide mental health services. Is there any suitable option in WordPress? I've already created the news portal section of that site ...
0
votes
0answers
15 views

WP Custom Post Type permalinks with category [duplicate]

I am trying to accomplish the following: Website will contain a section titled "resources". I would like to separate the content using content post types. Post Type: Resources ( This i can create via ...
5
votes
2answers
6k views

How to handle a hierarchy with custom post types

I have moved into WordPress for a few days and was quite impressed by all the available features, plugins and polished themes. I have spent quite some times reading documentation about themes and ...
0
votes
1answer
81 views

Rewriting hierarchical post type

SO, I'm having an issue where I need to rewrite a hierarchical custom post type. The custom post type is called "Destinations" and it hold regions, countries, and holidays. There is already content on ...
0
votes
1answer
2k views

List child categories from parent category on custom taxonomy page

I making some updates to a theme I'm currently working on. I've moved a bunch of categories that have custom post items under them into a parent category that's all within a custom taxonomy. e.g.: ...
0
votes
0answers
106 views

Need help understanding a rewrite with multi-level taxonomy

I am trying hard to learn how to do rewrites. Not having really any understanding of regex is obviously not a good start. I have a cpt books and a taxonomy book-publishers-series. I have written the ...
0
votes
0answers
105 views

How can I add a “fake” parent into the permalink?

I have a custom post type of books and a taxonomy of book-publishers-series. I am trying to do a rewrite so that my urls look like: ...
2
votes
2answers
2k views

How to set parent-child relationship between differents custom post types

I have just set up a post/parent relationship between a post type "episodes" and a post type "cartoon-series." I used this bit of code to add in the meta box to assign the parent from another post ...
-1
votes
1answer
64 views

How do I assign the post parent?

I am trying to connect two custom post types. Through lots of googling, I found the following code that adds a meta box to the admin screen to select a post from another post type as the parent, but ...
0
votes
1answer
170 views

How should I structure complex content hierarchies?

I am pretty new to WP and I have not had to deal with any overly complex content structures as of yet. Until now. I'm trying to figure out the right mix of Custom Post Types, Taxonomies, Pages, etc. ...
0
votes
0answers
58 views

Get menu as lists with hierarchy

I've a menu like this: Page Category 1 Category 2 Sub category A Sub category B Sub category C Category 3 Page ... Because I need to custom styling it, I need to print it on a template. I need ...
0
votes
0answers
95 views

HowTo preserve page hierarchy with wp_list_pages()?

I have created a dynamic way of displaying "sub-menu-items" using the built-in function wp_list_pages(). However I'm stuck with the hierarchy of the pages displayed because of the sort_column doesn't ...
2
votes
1answer
210 views

Categories' hierarchy in URL

The posts in the website I'm currently working on have multiple hierarchical categories applied to each of them. For instance: Source - Books -- Moby Dick -- Sherlock Holmes The permalinks are set ...
0
votes
1answer
179 views

Hierarchical list of custom taxonomy terms

I have a custom hierarchical taxonomy. I don't know how many nested terms will be in each term. What I want to do, is to list all taxonomy terms hierarchically no matter how deep each term is nested. ...