Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [hierarchical]

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

1
vote
0answers
11 views

How to categorize posts under Category 1 and Category 2 which are separate lists of categories, and display them as separate lists in widgets

Background My site is about DIY and 'making' around the house (let's say). Current version 5.1.1 I use posts for the content on my site which isn't strictly in "blog" (chronological) format in that ...
1
vote
0answers
9 views

How to set a CPT to have a page as a parent, then rewrite urls accordingly?

i have a CPT (called review) for review pages and I want to set these as children of pages i've created. right now my CPT slug looks like this: example.com/review/chewy-review but i have a page on ...
0
votes
0answers
13 views

How to select the parent category for child categories?

I would think if I select a child category, that the parent category would automatically be selected (with no choice to deselect the parent), but it's optional. Looking at how Wordpress sets up this ...
0
votes
1answer
27 views

post_row_actions not working for hierarchical post type

I'm working on a plugin where I have a Custom Post Type (CPT) registered and I need to add custom row actions to that particular post type. But could not make the following code hooked to ...
0
votes
0answers
66 views

Custom Post Type parent/child relationship rewrite rules for permalinks

I have been working on this for quite awhile but I'm stuck at rewriting the permalinks for both the parent and the child. So I created two custom post types: magazines and magazine-pages both MUST be ...
0
votes
1answer
37 views

Attempting to get number of grandchildren of page in WP_Query loop

I have a custom archive page(with map and location data) for a custom post type. Due to how the locations are hierarchal(state, city, location), I want to show the states only on the archive page, ...
1
vote
1answer
36 views

How do I display a list of posts under all hierarchical children of the current taxonomy?

Assume the following custom taxonomy structure: USA California Los Angeles San Francisco Oakland New York New York Buffalo Rochester Note: It's just sample data, so don't bother to correct it! ...
0
votes
0answers
21 views

Custom post types & Pages hierarchy - Error 404

I've defined two custom post types: Theme Fiche I've also 7 pages using a defined rubrique template: (template-rubrique.php) Both my Theme and Fiche have an ACF post-object field. The Theme ACF ...
0
votes
1answer
24 views

Display a specific hierarchical level of a specific custom taxonomy

How do I adapt the following snippet to apply to a specific custom taxonomy? It current applies to post categories I use the function below with this: <?php display_cat_level(X,true); ?> in my ...
0
votes
1answer
49 views

custom hierarchical taxonomy and custom post type list contains surplus posts

I wish to list custom taxonomy terms as titles and custom posts as lists under titles: Basics List item1 List item2 Movies List item3 Images List item4 However, custom taxonomy is HIERARCHICAL ...
0
votes
1answer
190 views

How to show term-specific post list, without posts associated with child terms?

Is this normal WordPress behaviour? I have: Custom post type: "article" Custom taxonomy: "company" (hierarchical) In the backend, when I go to the post list for "Articles", and constrain results by ...
0
votes
1answer
66 views

Creating a non-hierarchical Taxonomy that behaves like categories

I've created a custom post-type along with a custom taxonomy and everything is fine, apart from one particular thing. First off, my use case: I need it to act like a category system, however not be ...
1
vote
1answer
35 views

Hierarchical or Non-hierarchical Custom Post Type in Real World Example

Well the simplest answer is a Non-hierarchical Custom Post Type is like regular posts and a Hierarchical Post Type is like a page but this still confusing for me. I can understand easily the ...
0
votes
2answers
40 views

Custom Post type & Taxonomy 404

I've created a custom post type & taxonomy, however when I go to my taxonomy page it throws a 404 error and I can't understand why. // Register Custom Post Type function portfolio_post_type() { ...
1
vote
0answers
332 views

Add Product categories to Wordpress menu without losing hierarchy

I need to add product categories to Wordpress menu, but when I'm doing this with WP interface it lose the hierarchy I tried with WP-CLI, but there is no method to specify wich item is the child. ...
0
votes
1answer
35 views

outputting taxonomy hierarchy

I have a site where I've listed a list of subcategories for a side navigation. I need to break those subcategories into a more specific hierarchy. It's currently outputting a list from a parent ...
0
votes
0answers
27 views

How to publish pages under a subdomain url?

I have created a subdomain as: blog.example.com How to put publish my pages as blog.example.com/page1 blog.example.com/page2
0
votes
0answers
133 views

hierarchical Custom post type child permalink not found

I currently have a custom post type that is set up to be hierarchical. $labels2 = array( 'name' => __( 'Services' ), 'singular_name' => __( 'Service' ), '...
0
votes
1answer
67 views

How do I quickly hide a hierarchy of pages from search engines and external users?

I use Multisite to manage the various languages of a web site. The original language site has a huge page hierarchy (navigation items with plenty of sub-pages and sub-sub-pages), à la I've cloned ...
1
vote
0answers
91 views

Rewrite Rule for showing Parent/Child Relationship between Two Hierarchical Custom Post Types

I have been pulling my hair out trying to figure out how to get this to work. The site I am working on has two post types created using the Toolset plugin. One for Regions and one for Locations. Both ...
0
votes
1answer
290 views

Create a Hierarchical List of Custom Taxonomies AND Posts

I'd like to create a 3-tier hierarchical list of terms within a custom taxonomy, which includes up to 10 posts within each of the bottom-level term(s) only. e.g. Custom Taxonomy - Parent Term 1 -- ...
0
votes
1answer
15 views

Can I assign a Folder for Post Formats, without it affecting WordPress' fallback/hierarchical system?

I have created a few Post Format Templates Files. format-aside and format-audio etc. At present, I am using <?php get_template_part (‘format’,get_post_format()) ;?> to call such Templates. In ...
3
votes
2answers
44 views

Does the 'WordPress Order' feature, within the WordPress Dashboard, have any impact on site architecture?

As you can see, within the image below, WordPress offers us to numerically arrange our Pages via a feature entitled 'Order'. I have been using this as a means to help organise my Pages, for my own ...
1
vote
1answer
5k views

Permalinks for WooCommerce Categories and Subcategories

Setup Desired permalink structure (only these structures exist for products) Product 1: /shop/category/subcategory/product1/ Product 2: /shop/category/product2/ Woocommerce Product View Settings ...
0
votes
1answer
235 views

How to query for posts (hierarchical custom post type) that have children but are NOT top level?

I'm trying to create a custom filter for a custom post type that will display only posts that have children – post_parent__not_in => 0 won't work because these posts have parents. I'm trying to ...
0
votes
1answer
464 views

Ajax Load More on Hierarchical Categories

I am developing a plugin where I have to add Ajax Load more. The page where I need it is Taxonomy Archive Page. Everything works fine if there is no child categories but whenever child category is ...
0
votes
1answer
352 views

Hierarchical Custom Post Types - Show only parent on tax archive?

I have a cpt of Accommodation Taxonomy of Region Regions are then added like USA, Canada etc Then for the posts: I create a post for a whatever Resort and a child posts of whatever Hotel in that ...
1
vote
1answer
40 views

Need help with permalink rewrites for Custom Post Types with hierarchical relationships

I'm working on a TV website that has several custom post types that are separate, but related (e.g. Series, Episodes, Videos). There are hierarchical relationships between these post types - Episodes ...
0
votes
1answer
29 views

Will renaming a `content.php` file cause any problems?

I am currently creating a few templates for the various Blog formats, such as; 'Aside', 'Quote' and 'Gallery'. I see a lot of people create such Templates by naming such files as: content-aside....
0
votes
0answers
138 views

How to define a custom hierarchy for terms?

I've got terms defined under a custom taxonomy. I want the terms to be pseudo-hierarchical, in that I want each term to be able to define a "parent" term that can be selected from a drop-down, but I ...
1
vote
2answers
49 views

How to display terms from a custom taxonomy in a hierarchy AND with custom html markup?

I've created a custom taxonomy (locations) which is hierarchical, and would like to: a) display an unordered list that respects the hierarchy AND b)customize the display output so that I can specify a ...
0
votes
1answer
45 views

Migrating Hierarchal Taxonomy Categories Between Post Types

I'm migrating about 500 posts (WooCommerce products, actually) to a new Custom Post type (using Convert Post Types plugin) and want to also migrate the Categories. There are the Taxonomy Converter ...
0
votes
1answer
1k views

how to create child posts with parent post in wordpress?

I want to create some future posts under one parent post, in that case in think relationship in WordPress posts is better option for me. So anyone who know about my question.
1
vote
0answers
95 views

Rewrites/query for multiple hierarchical custom post types

I need to produce the following: Two post types (collection & collaboration) that are hierarchical to each other. Collections can be parents to other collections and collaborations. /collection-a/...
-1
votes
2answers
41 views

More than one Hierarchical Taxonomy and SEO

I don't know if this is a good question or an incredibly stupid one. But I'll ask anyway. Websites can't have more than one hierarchical taxonomy. It would be an SEO disaster. But still, some may ...
1
vote
1answer
46 views

How can I get this custom post type permalink structure? %custom_post_type%-%taxonomy%-%term-postname%

Please help - I've tried almost everything and I'm absolutely lost! I'm desperate to get the following permalink structure set up: ladsholidayguide.com/custom_post/taxonomy/term/postname For ...
0
votes
1answer
800 views

Use Drag & Drop Functionality from WordPress Admin Area in the Frontend?

I'm building a membership site with a little pseudo-CMS on the frontend that allows users to post music-related items. For this, I would like to give users the ability to order the items by using a ...
0
votes
0answers
236 views

Display posts of a hierarchical custom post type excluding parent posts

I am trying to build a query for a hierarchical custom post type and I want to display only parent posts (Exclude Children). The following is a simple query I added to displaying everything first, ...
5
votes
1answer
6k views

Display a list of child posts on parent posts of a custom post type

I have a hierarchical custom post type called 'products'and I have created a 2 level parent-child relationship. I want to list all the subpages/child posts on each parent post but I have tried ...
0
votes
4answers
1k views

Display hierarchical subterms of custom taxonomy based on depth

There is the following hierarchical taxonomy structure of a specific post: Term A SubTerm A.1 SubTerm A.2 SubTerm A.2.1 Term B SubTerm B.1 SubTerm B.1.1 SubTerm B.1.2 How to display all ...
1
vote
1answer
302 views

How to make custom post taxonomy looks like regular categories?

If I create a regular taxonomy for my custom post type, it behaves and looks like built-in tags taxonomy: And if I need to make it look like categories, I can add next 'hierarchical' => true ...
0
votes
0answers
49 views

Most efficient way of showing children posts?

In the Parent Post template (say single-country.php for 'country' CPT), I want to show the permalinks for its Children Posts. In this case, let's say all children CPT's are on the same level, so '...
0
votes
1answer
86 views

Hierarchical Custom Post Type Walker?

I've spent a LONG time trying to get nested custom post types working. Here's the setup. I have two custom post types, topics and replies. I'm looping through topics and inside the topic loop I'm ...
1
vote
0answers
36 views

A case for Hierarchical Custom Posts

So I have 3 Custom Posts created with the Types plugin (the plugin should be irrelevant, anyway): 'Hotels', 'Rooms' and 'Webcams'. These last two are hierarchical, with 'Hotels' as their parent, set ...
1
vote
2answers
515 views

Category tree is flattened inside admin upon saving

Is there a way to avoid WordPress "flattening" the category tree when a child category is selected? This applies to both custom taxonomies and WP's built in "category" taxonomy. To explain further, ...
1
vote
2answers
67 views

Categories vs. Page Site Organization

I need to organize the pages on my website so that they appear with the proper hierarchy. The problem is that the category-derived page is appearing outside my hierarchy. This is the current ...
1
vote
2answers
5k views

Different template for subcategories

I would like to have a different template for categories and subcategories The categories template is set in categories.php is it somehow possible to load the subcategories template from subcategories....
0
votes
1answer
156 views

Display a Custom Post Type within another with hierarchically slug

I'm working on a study site in WordPress and I'm using custom post types. The Custom Post Type Course is responsible for creating the courses, displayed in single-courses.php, where the basic ...
2
votes
1answer
746 views

Parent / Child formatting in a list of post of a custom post type

I am building a long manual for my companies procedures. We have each section (and sub-section) entered as parent and child posts in a custom post type. I have the loop running properly, but I would ...
0
votes
1answer
1k views

Remove base slug in permalinks of hierarchical custom post type

I have a hierarchical Custom Post Type called project, registered as follows: register_post_type( 'project', array( 'public' => true, 'hierarchical' => true, ...