• Skip to main content
  • Skip to primary sidebar
  • Home
  • WordPress
  • web Hosting
  • linux
  • mysql
  • nginx
  • apache2
  • devops

Raju Ginni

wordpress tutorials seo hosting etc

wordpress hierarchical posts like pages how achieve them

August 8, 2025 By Raju Ginne

Table of Contents

Toggle
    • Method 1: Using Permalinks with Categories (Most Common)
    • Using a Plugin for True Hierarchical Posts
  • Add page-attributes to posts wordpress
  • Add Post parent to posts wordpress  hierarchical support
    • Permalink Manager Permastructure tags

Method 1: Using Permalinks with Categories (Most Common)

This is the easiest and most popular way to create a nested URL structure for posts in WordPress. You essentially use your pillar page as a category and your cluster pages as posts assigned to that category.

Here’s a step-by-step guide:

Step 1: Set Up Your Permalinks

  • In your WordPress dashboard, go to Settings > Permalinks.
  • Select the “Custom Structure” option.
  • In the text box, enter the following permalink structure: /%category%/%postname%/
  • Click “Save Changes.”

Using a Plugin for True Hierarchical Posts

 

If you absolutely need a parent-child relationship for posts that mimics the “Page Attributes” feature, you will need to use a plugin. These plugins change the default behavior of posts to make them hierarchical.

  • Plugin Search: Look for plugins in the WordPress repository with terms like “hierarchical posts,” “post parent,” or “post type parent/child.”
  • How it works: Once installed, these plugins will add a “Parent” dropdown to the Post editor sidebar, allowing you to select a parent post just like you would for a page.

 

  • Nested Pages: This plugin provides a drag-and-drop interface that makes it easy to organize posts and pages hierarchically, giving you a tree view in the backend. just for viewing
    Settings>>nested pages>> post types >> enable for posts>> after that >>posts>> Sort view >> drag drop just for viewing
  • Post Types Order: While primarily for sorting, it has advanced features for hierarchical ordering.
    Simple Custom Post Order: Not usable just drag drop posts in wordpres posts page.
  • Custom Post Type UI (CPT UI): This is a developer-focused plugin that allows you to create your own custom post types. When creating a new post type, you can set hierarchical to true and enable page-attributes, which gives you the parent-child functionality you’re looking for. This is a very robust solution, but it means you would be using a “article” custom post type instead of the default “post” type.

Add page-attributes to posts wordpress

function add_page_attributes_to_posts() {
add_post_type_support( ‘post’, ‘page-attributes’ );
add_post_type_support( ‘post’, ‘hierarchical’ ); // Optional, enables parent/child relationship
}
add_action( ‘init’, ‘add_page_attributes_to_posts’ );

The Page Attributes metabox allows you to set

  1. page parents
  2. templates,
  3. change the order of your pages.

Add Post parent to posts wordpress  hierarchical support

Custom Post Types with Hierarchical Support:

register_post_type( ‘your_custom_post_type’,
array(
‘labels’ => array(
‘name’ => __( ‘Your Custom Posts’ ),
‘singular_name’ => __( ‘Your Custom Post’ )
),
‘public’ => true,
‘has_archive’ => true,
‘hierarchical’ => true, // Enable hierarchical support
)
);

 

Permalink Manager Permastructure tags

%year%, %monthnum%, %day%, %hour%, %minute%, %second%, %post_id%, %author%, %search%, %category%, %post_tag%, %post_format%, %sitemap%, %sitemap-subtype%, %sitemap-stylesheet%, %aiosrs-schema%, %taxonomy%, %post_type%, %term_id%, %monthname%

%post_type% permalink structure in wordpress  = custom post type slug like book

 

Make Default Posts Hierarchical (Less Recommended).

While possible, this approach is generally less recommended as it alters the default behavior of WordPress posts and might lead to unexpected interactions with themes or plugins designed for non-hierarchical posts. You can achieve this by modifying the post post type’s properties:

Code
    add_action( 'registered_post_type', 'make_posts_hierarchical', 10, 2 );

function make_posts_hierarchical( $post_type, $pto ) {
if ( 'post' === $post_type ) {
global $wp_post_types;
$wp_post_types['post']->hierarchical = true;
add_post_type_support( 'post', 'page-attributes' );
}
}
This code snippet, added to your theme’s functions.php file or a custom plugin, will make the default “Post” type hierarchical and add the “Page Attributes” meta box to the Post edit screen, allowing you to set a parent. Utilize Plugins.

 

Problem with post contnet generation need to fix further ..

About Raju Ginne

AMFI Registered mutual fund distributor based in Hyderabad. you may contact me for mutual funds SIP investments Whatsapp: 9966367675.
nism certified research analyst

Primary Sidebar

hi i am raju ginni, primalry i manage wordpress websites on GCP cloud platform as a cloud engineer, and create content on passionate things.
you can follow me on youtbe

© 2025 - All Rights Reserved Disclaimer & Privacy Policy