As it’s not clearly stated, how (in code) the “related” CPTs are interconnected, I want to post a mostly overseen possibility for CPTs.
When you register_post_type()
, you have the argument of hierarchical
that should be set to true
to allow for 'supports' => array( 'page-attributes' )
. This then allows you to define an order manually.
Related Posts:
- How to retrieve all post titles of a specific post type?
- How to use a custom post type as front page?
- How to order custom post type by multiple custom fields?
- Sort Order for a Custom Query in a Post Type Archive Not Working
- query multiple taxonomies
- Custom Taxonomy with Custom Post Type Finds No Posts
- Display several random posts, but make sure a condition is met
- How can I generate a RSS feed based on a custom WP_Query?
- Custom query – alternate posts by category
- Search Custom Post Type with all meta attached?
- Pagination Doesn’t Work
- Query by 2 values of a repeater ACF field
- Custom post type loop split/ordered by taxonomy
- Display two post types ordered by two custom fields
- Display children and grandchildren of a custom post type
- Getting all custom posts with a certain category
- Sort by two dates. Default entry date and custom field if present
- Querying CPT with Two Taxonomies
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- Custom Query to display posts with custom field
- Get taxonomy description based on variable
- Custom post_type search’s $wp_query->query_vars do not correspond
- CPT posts listed by category with custom rewrite URL, please help!
- How to use WP_Query in a CPT achive page?
- Use get_post_types to query only custom posts types
- Group custom posts by custom taxonomy names
- How can i skip same post from taxonomy term?
- Using global $post; to get featured image for custom post via WP_Query
- Query custom post type by category slug
- Can’t query tag and post_type at the same time
- Pagination on a custom post type loop
- WP_Query orderby modified to include custom meta changes
- Returning a list of custom post types excluding those without a specific meta_value
- query private custom post type
- Wrong request query on cpt and tax
- Search / Filter posts on Title/Content OR Tags
- Converting the_content string to an array?
- A method for ordering mixed dates in search result loop (theory only, no actual code)
- What’s the WP way to load remaining custom posts?
- Several post types on WP Query by tag and taxonomy
- Filter Posts from the Main Query
- Pagination with custom query, custom search form, single and pages, ajax and no plugins
- How can I group posts by months and years?
- Display post from a date range from custom field
- Displaying a div from an assigned meta_value when on a page
- Creating two loops based on different logic
- Retrieving meta-box from a custom-post-type
- Getting a custom post’s custom field based on another custom post’s custom field select
- Custom post type loop with custom category filtering
- Show message when query has no posts
- How to show all taxonomies within custom post type loop
- WP_Query not resetting after wp_reset_postdata
- Custom post type to lead to single post type instead of shortcode modal
- Filter posts of custom post type by meta key in (List All Section)
- Query Posts that have Custom Taxonomy
- Display post from custom post type
- Query Posts, order by meta value
- Foreach loop returning more than one item when querying taxonomy
- how to compare different timestamps in wp-query for events custom post types?
- Is there a (preferable built-in) way to check what custom queries are used in a theme?
- Sorting the Loop by Taxonomy Value
- Previous / Next Links For Custom Post Type Sorted By Meta_Value
- Custom Query: Multiple CPTs and a taxonomy filter
- Ordering by meta value not working
- Custom wp-query display post only today
- Create if else for post types in WP_Query ‘post__in’ values
- Query to Exclude Child Pages from Custom Post Type Archive
- Custom post type query with taxonomy
- How to output custom post type title on custom page with category next to it?
- Display Custom Post Type Based on Taxonomy With WP_Query()
- Search Function not searching correct custom_post_type even though post_type is defined in search args
- How can I fetch all the dates from custom fields from various different custom post types and show / list them at one place in ascending order?
- How to use multiple orderby conditions on query search results? (orderby one post type, relevance)
- Query a custom taxonomy in a function to create an csv file
- Custom Post By Category
- Mix Facebook and Twitter feed into custom posts
- pre_get_posts gives 404 error on Custom Post
- Query for a custom post taxonomy
- Get post from Category by Priority
- WordPress loop multiple orderby query with Types toolset
- Strange behavior on WP_query
- Get posts associated with custom taxonomy alternate way
- Calling specific page with wp query
- display news with pictures 3 small and one large (loop)
- tax_query showing no results
- Can’t use orderby in WP_Query
- Custom post type blog pagination conflict
- WP_Query get posts where post_name is empty
- Custom post type pagination, single page issue
- How to display elements of different post types?
- display post types alternately
- Trying to combine multiple WordPress queries
- Cannot query custom post type taxonomy from theme options array
- Query Custom Post Type by Tag
- How to store queried custom data and use it in multiple pages?
- Adding custom shortcode to page leads to page without styling
- Attaching multiple custom taxonomies to one CPT?
- Order Wp Query by earliest of 3 dates meta query
- Default WordPress Query for a Specific Custom Post Type URL
- Query custom post type and group by taxonomy