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 difference between Hierarchical and Non-Hierarchical Taxonomies which can make a Tag or a Category but this usage is not vary clear … Read more

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 ‘topcat, childcat, yetchildcat’ on the post page, but get_the_terms only return ‘yetchildcat‘, how do i get all? 5 Answers 5 There … Read more

Post type hierarchy

I am looking to create two custom post types, one of which is a child of the other. Let’s call them Authors and Books for simplicity. Authors should be a top level URL and the landing page for them should show a list of all their authored books. So you’d have something like: http://mysite.com/Shakespeare/ http://mysite.com/Shakespeare/Macbeth … Read more

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 View for shopbase: Show categories View for categories: Show products Products Products are only checked for one category OR subcategory Permalink Settings Normal settings: /%category%/%postname%/ Base for categories: shop For products: /shop/%product_cat%/ Archives Since there … Read more

how to automatically generate hierarchical menus from hierarchy of pages?

I have a photo site, and I take care to crested a logical nested hierarchy of pages. e.g. for photos I just posted, I created the following pages: site.com/2013/ site.com/2013/colorado/ site.com/2013/colorado/crested-butte/ the last of these is the one on which I placed my photos. I want hierarchical menus that are easy to navigate/browse. How do … Read more

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 same functionality like categories? 3 Answers 3 Just clarifying, what was pointed out by Parst with a working example of a custom taxonomy registration … Read more

Categories lose hierarchy order once assigned to post

I setup some hierarchical categories and when I assign them to a post the widget reflows and loses the hierarchy display. Example: – Education Services — Arts & Archives — Fine Arts — Reference — Health Sciences When selecting “Education Services” & “Reference” (marked with ‘x’) the widget appears like this: x Education Services -x … Read more