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
2answers
485 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 ...
0
votes
1answer
327 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: ...
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
14 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
17 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
581 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
48 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
502 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
45 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
14 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
60 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
897 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
37 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
53 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: ...
1
vote
2answers
250 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
33 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
58 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
24 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
55 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
82 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
44 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. ...
0
votes
0answers
29 views

How to print search results related categories hierarchical?

I'm trying to print search results related categories hierarchical in sidebar area. I did that but my code prints just terms without their parents. Here is my page. I want to print the terms like ...
0
votes
1answer
195 views

How to check if last uri segment is a custom post type or taxonomy term?

After following Jeffs suggestion on this thread to create nested parent and child taxonomy terms within a permalink like... url.com/custom-post-type/taxonomy-parent/taxonomy-child/cpt-entry It ...
3
votes
3answers
341 views

Custom Post Type as Page parent

So there are a million snippets for how to get pages as parents of custom post types. However, the reverse seems to be questionable. One would think, since everything in WordPress is technically a ...
2
votes
4answers
833 views

How to fix a double slash in custom permalinks with hierarchical taxonomy's?

Following the solution from Jeff @ Custom permalinks - post type - hierarchical taxonomy's I managed to rewrite my url's for custom taxonomy's. However i do have one thing that bothers me and ...
5
votes
4answers
5k views

WordPress admin screen very slow / timing out when editing or adding a new page/custom post

I'm new to the site but appreciate any help you can give. I have a WordPress set-up which (rightly or wrongly) has hundreds of pages and thousands of another custom post type which is also based on a ...
12
votes
6answers
6k views

Integrating a custom post type into a page hierarchy

I'm creating a theme with a custom post type for team members, I've also got the following page structure: about <-- this is a page about/team-members <-- this is a page, lists all the team ...
4
votes
5answers
16k 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' ...
4
votes
4answers
7k views

Custom taxonomy, get_the_terms, listing in order of parent > child

I have a hierarchical custom taxonomy which I can display using print_r(get_the_terms( $post->ID, 'taxonomic_rank' ));: Array ( [46] => stdClass Object ( [term_id] => ...
0
votes
1answer
37 views

Query all post types but limit to parents

I'm building a site with several post types and am using a single index.php to query the archive for each one in turn. One of these post types is hierarchical and I'd like to just query the parent. I ...
0
votes
1answer
307 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 ...
0
votes
0answers
86 views

Change custom_post_type permalink to post_type/year/month/post_title

I've create a archive template based on a new post type using this functions: add_action('init', 'demo_register_post_type'); function demo_register_post_type() { register_post_type('archive', ...
16
votes
8answers
13k 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 - ...
3
votes
3answers
16k views

get_posts assigned to a specific custom taxonomy term, and not the term's children

Say I have the following taxonomy terms: Term 1 Term 1.1 Term 1.2 Term 2 Term 2.1 How can I get only posts that are assigned to Term 1 and not include those that are assigned to Term 1.1 or ...
1
vote
1answer
548 views

Determine Term depth

I'm looking to be able to find the depth of a term within it's hierarchical tree. Produce -- Vegetables ---- Carrot ---- Onion ---- Celery -- Fruit ---- Apple ------ HoneyCrisp ----Orange Produce ...
0
votes
0answers
101 views

How to display related posts based on specific shared subcategories with current post

Im trying to find a way to display related posts that share specific subcategories with the current post. So for example, lets say the current post has the following subcategories associated with ...
0
votes
1answer
120 views

get all levels parents from id term

I have a term referenced by $id. The term is inside a tree of levels. rootlevel parent (parent=0) first level parent second level parent ... ... last ...
1
vote
2answers
349 views

How to only show posts on last child category

By default WordPress will list posts on each category in its hierarchy. Example: Parent /- child /-- grandchild When viewing the "Parent" category you will see a list of posts from child, ...
0
votes
1answer
316 views

get_pages — parent vs child_of?

I'm working with get_pages on a site that has a very clean and hierarchical structure. As part of a template, I wanted to show child pages as part of the template's 'boilerplate'. Reading the Codex ...
0
votes
0answers
72 views

Add Child custom posts to custom post parent

I have one requirement to show document api, faq, videos under different parents. Example: Software and Hardware Software {software1, software2, software3} Hardware {hardware1, hardware2, ...
-1
votes
3answers
552 views

Get terms in hierarchical taxonomy

I have a hierarchical custom taxonomy ("photos"), with 3 parent terms color location year Each parent term has several children terms. I have associated the "photos" taxonomy with pages and have ...
4
votes
3answers
723 views

Hierachical Custom post types permalinks not working

Been looking for someone with this same problem for hours now so I decided to post my own thread. I have a hierachical custom post type called contact-information. Using this I have parentpages ...
1
vote
0answers
128 views

Hierarchial Custom Post Types/Taxonomies

I've been learning Wordpress for the last few weeks and I'm now creating my own theme. I found this question which seems to be exactly what I want to do, but I can't get it working and I suspect its ...
0
votes
1answer
102 views

How to include parent terms in hierarchical taxonomy URLs?

For all custom taxonomies, the URLs look like: /base/slug/. I need a solution to for my hierarchical taxonomies to have: /base/parentslug/childslug/. Anybody knows how to redirect and or to have the ...
2
votes
0answers
149 views

How to Combine Two Custom Post Types into Single Permalink Structure

The website uses - A) A hierarcical Custom Post Type "Destination" to support the following structure, so each tier of the hierarchy could have its own unique destination guide: Territory - ...
0
votes
1answer
169 views

Hierarchical Taxonomy Terms Select Menu Output with selected=“selected” Set

I have been trying to wrap my head around a issue for the past 2 days but despite trying all I could, I can't seem to reach the solution. On the backend, I have a hierarchical taxonomy named ...
1
vote
0answers
16 views

'Create New Child Post' from Parent Post using a button - not using Attribute drop-down

I have a custom post type "my_custom_post_type" which contains posts using a grandparent > parent > child hierarchy. I am currently using the 'Attribute' drop down to assign a new post to a parent ...