I’m guessing the part you want to change is the actual content output area (not the nav). If so, you could do this:
<?php
$args = array(
'post_type' => 'manual',
'posts_per_page'=>'-1',
'orderby'=>'menu_order',
'order'=>'asc'
);
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
$class="parent";
$header="h1";
if ($loop->post->post_parent !== 0) {
$class="child";
$header="h2";
}
echo '<' . $header . ' class="' . $class . '" id="' . $loop->post->ID . '">' . get_the_title() . '</' . $header . '>';
?>
Related Posts:
- How to query for posts (in hierarchical custom post type) that have children?
- How to query for posts (hierarchical custom post type) that have children but are NOT top level?
- Display posts of a hierarchical custom post type excluding parent posts
- Most efficient way of showing children posts?
- Query all posts where a meta key does not exist
- Exclude a category from WP_Query
- Single loop for wp_query and wp_user_query
- query multiple taxonomies
- Custom Post Type, WP_Query and ‘orderby’
- Hierachical Custom post types permalinks not working
- Include post id[s] into WP_Query()
- Syntax to get the Nth item in a list of custom post types?
- Grab 5 latest posts from custom post type ‘announcements’
- WP_Query to loop a Custom Field, Custom Post Types do not show
- How to check if last uri segment is a custom post type or taxonomy term?
- Pagination Doesn’t Work
- Numeric pagination custom post type
- Sort the main query in subcategories/terms?
- How to show posts from multiple post types in a single loop? And display them separately on the same template
- Get post info inside modal window?
- Want to filter only parent post in admin area
- Pagination Issue: Custom Post Type In Index
- Having trouble with custom date field for CPT query (WordPress)
- Quickest way to get last or oldest post date – WP Query
- Detect if 1st, 2nd or 3rd level custom page?
- Display posts if a custom field value is equal to another custom field value
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- Lists Posts from CPT that match the Title of the Page
- Custom Post Type with two hierarchical Custom Taxonomies: strategy to generate best permalink structure
- Filtering by Post Meta Custom Fields – Performance
- Unable to get paginate_links working with a custom query [duplicate]
- Returning a list of custom post types excluding those without a specific meta_value
- query private custom post type
- Custom Post Type / Two level deep taxonomy (cat. and subcat.) uri problem (error 404)
- Randomize Posts. Skip the first post in ascending order
- Pagination for Custom Taxonomy Page [duplicate]
- Custom loop with multiple taxonomy queries
- Isotope Filtering with Bootstrap Tabs – Custom Post Type Query Loop in each Tab (Have to click twice to filter)
- creat filter with wp_query
- How to do WP_Query with two meta fields with orderby clause
- Get Posts by multiple custom fields is not working
- Custom query at top of archive search page, arguments are overridden
- How to have this permalink structure: post_type/postname/custom_inner_page
- Sort entries by date mixing two post types
- custom post type search by reference id
- Custom Taxonomy Not Showing in Front-End When Outputting a Custom Post Type with WP_Query()
- Print current post category during WP_Query
- Multiple Custom Post Type queries, how to DRY it up
- WPDB for post count on post
- post_per_page ignored in WP_Query
- WP_Query parameter conflict
- Retrieving meta-box from a custom-post-type
- Cannot get custom post
- Custom post type and standard post not displaying or working
- custom hierarchical taxonomy and custom post type list contains surplus posts
- Display custom post type for specific user
- Get all post from a post type
- A faster way to query custom post types with multiple conditions?
- List all Custom Post Type posts excluding certain Taxnomy term
- WP_Query: Posts within category OR custom post type
- Custom post type pagination error
- posts_per_page in custom WP_Query does not override “Reading” settings?
- WP Query from two Custom Post type fields as statement
- Display Parent-Child Posts in specific order by comparing IDs in array
- Display post count for a specific month
- Setting Custom Post Type Parents/Hierarchies
- Query to Exclude Child Pages from Custom Post Type Archive
- Custom taxonomy terms hierarchical navigation
- WP_query has incorrect wp_posts.post_name = ‘asc’ when I have custom post type called ‘order’
- Randomizing WordPress Custom Post Type Sorting Through Them Without Page Refresh
- Order posts alphabetically with numbers but some of the posts has numbers in the title
- How to output custom post type title on custom page with category next to it?
- How to sort by multiple values in a nested WP_Query
- SEARCH QUERIES – REVERSE OUTPUT
- post_type incorrect for custom post type
- Live search by custom tag
- hierarchical Custom post type child permalink not found
- How to get the posts that my following users are liked?
- Only show categories that have posts within custom post type
- SQL LIKE in WP_Query
- How can you use a page for a custom post type?
- WP Query with multiple post types ordered by custom meta date then published date
- CPT Efficient way to display posts from different categories with custom query
- How To Loop Through list with Custom Post Types
- CPT or Custom Table for Repository of Serial Numbers
- Use Tags to Query Associated Multiple Posts and Get The Average Of Custom Field Values
- Custom Post Type + Category archive
- Values inside a custom field to determine which category posts to display
- WP_Query get posts where post_name is empty
- How do I sort post listing by child post count?
- Pop up showing same content on all posts display.
- Custom post-type’s pagination not working in category.php
- Querying meta values within an array
- Count of posts with meta_key filled in?
- Rewriting hierarchical post type
- Archive page – problem with pagination
- Are custom posts included when getting a categories’ posts?
- Query order by meta value force specific tag first
- WP Query + custom fields: How to query event posts from the current date backwards 6 months and organize it month by month?
- How do I get parameters from the URL?