Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

hierarchical

get_pages — parent vs child_of?

I believe the difference is depth. For parent, that’s one level deep, whereas child_of is multiple levels (grandchildren).

Categories page-template Tags hierarchical, page-template, pages

Remove base slug in permalinks of hierarchical custom post type

This will allow you to use the post name without the slug. Essentially anytime the link is requested it can be altered to exclude the base post type. And any time a query runs with just a name, the available post types used in the search are altered to include your post type. function wpse_remove_cpt_slug( … Read more

Categories custom-post-types Tags .htaccess, custom-post-types, hierarchical, mod-rewrite, url-rewriting

Category tree is flattened inside admin upon saving

I haven’t fully tested this, but it may be helpful: Categories in Hierarchical Order plugin at https://wordpress.org/plugins/categories-in-hierarchical-order/

Categories categories Tags categories, custom-taxonomy, hierarchical

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

<?php the_category( ‘ > ‘, ‘multiple’, $post->ID); echo ‘ > ‘; the_title(); ?> This works correctly when the post is in just one category. But if it’s in multiple categories, or if the category parents are also selected — in your case, if the post is also in super-cat and parent-cat — then it displays … Read more

Categories categories Tags categories, hierarchical

Hierarchical Custom Posts – Highlighting Current Post in Sub-Menu

Hierarchical Custom Posts – Highlighting Current Post in Sub-Menu

Categories custom-post-types Tags custom-post-types, hierarchical, navigation, wp-list-pages

How can I get an tag to wrap each ancestor that gets outputted in this condition?

To wrap your titles in h2 just change echo $ban_titles; to echo ‘<h2>’. $ban_titles . ‘</h2>’;. If you want to limit number of titles displayed to 2 change for($i=0; $i<count($pages); $i++) to for($i=0; $i<2; $i++). Hope it helps, PHP is not so scary after all 🙂 [edit] How about that? //This is the loop that … Read more

Categories categories Tags categories, functions, hierarchical

Automatically populate a hierarchical taxonomy from a custom field

IF it were me, I would make “Year” and “Month” separate taxonomies rather than using a hierarchical taxonomy. If you do it that way, here’s a good answer to use as a reference. This will solve the “unique slug” issues you’ll run into using hierarchical taxonomies.

Categories custom-post-types Tags custom-field, custom-post-types, custom-taxonomy, hierarchical

Custom Post Type with two hierarchical Custom Taxonomies: strategy to generate best permalink structure

Custom Post Type with two hierarchical Custom Taxonomies: strategy to generate best permalink structure

Categories custom-post-types Tags custom-post-types, custom-taxonomy, hierarchical, permalinks, slug

Custom Posts Hierarchy? (State/City/Restaurant)

Custom Posts Hierarchy? (State/City/Restaurant)

Categories custom-post-types Tags custom-field, custom-post-types, custom-taxonomy, hierarchical

How to Combine Two Custom Post Types into Single Permalink Structure

How to Combine Two Custom Post Types into Single Permalink Structure

Categories custom-post-types Tags custom-post-types, hierarchical, rewrite-rules, url-rewriting
Older posts
Newer posts
← Previous Page1 … Page18 Page19 Page20 … Page27 Next →
+ More

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 2026 Read For Learn
Next Page »
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress