How do you retrieve and echo this structure in first place?
I don’t think you can query by something like this (without some wicked SQL), so it would be probably easier to:
- Retrieve parent posts.
- Look up newest child (query, sort by date, limit to one).
- Reorder parent posts accordingly.
Related Posts:
- How to Change Order of Posts in Admin?
- Random sort within an already sorted query
- Different post sort order within different categories
- Setting Custom Sort Order of Posts within a Category
- Can I force a metabox to be in one column?
- How to Group Posts by the First Letter or Number?
- How to Arrange Posts by Size in the WordPress Dashboard?
- blog posts sorting doesnt work while using get_query_var
- How to sort posts by last name (2nd word) on ONE category only?
- Group Posts by First Letter of Title
- Sort wp post title with alphabetically and numerically?
- Exclude posts with specific meta_value while sorting by a separate meta_value
- Possible to create a permalink to sort with meta_key?
- How to choose a sort order (for posts) per category? (ideally when creating a new category)
- Plugin for sortable posts in grid [closed]
- How to display sorted posts in the ‘All Posts’ page
- Filter Posts by Excluding Categories
- Sorting posts alphabetical that have single digits
- Sorting posts according to the term they belong to
- Sorting posts according to view counts not working
- Server-side sorting of posts
- How to sort posts inside categories
- How to display posts via custom taxonomy terms using checkboxes?
- how can i change WP main archives loop to sort by name or title
- how to get post order by post id wp_query?
- Sort Custom Post Type by Category ID then Post Name
- Post filtering is returning blank page
- Sort by last word in title
- Sort All Posts by Category Name in the Admin Panel?
- How to list post as buch of category, and all of them
- How to sort WP_Post Object array by object field in php?
- Sorting post by custom field and category
- Ajaxify Post Sort
- How to sort posts in admin by name
- Sort / Filter Queries
- Sorting Posts by Date – get_blogs_of_user_id()
- Sort Posts Alphabetically by Multiple Categories [duplicate]
- How to get alphabetic listing x other posts, based on first letter post?
- Sort by category and then date?
- custom sort posts in archive/taxanomy page
- Filter/Sort Post Form On Taxonomy page
- Sort Posts Alphabetically Based on Specific Category (Divi)
- How to sort posts alphabetically based on a specific parent category
- How to automatically generate a unique random slug
- How does filter the_posts work?
- Querying post from a multisite network
- Publish pending article from front end with a button?
- How can I export WordPress posts’ attachments?
- How to update all post at once?
- Force update all posts in custom post type, no content changes
- Add custom field to category of custom post type
- Load posts into sidebar and paginate via ajax?
- How to intercept Post Title on Post-Save
- Is it possible to have two different previews of a post (ie. two templates for one post)?
- how to know if the post has pagination () or not
- WP Query related posts by current page Tag ID
- How to restore permanently trash page? [closed]
- The short content by characters [duplicate]
- Most recent post from another database
- post_content sanitization / transformation process
- wp_insert_post – duration
- Recent Post Added To Menu Shows Ghost Post With No Title
- How to display the link (title) and thumbnail post?
- Pagination with an array of post objects?
- Removal of Media Gallery pictures
- Visual (non-HTML) display of post revisions [closed]
- How can I hide tags on a child-category page, if that tag has not been used?
- One post on my website is going to a 404 page
- An array of latest wp_titles
- “about us”, ” contact” sections should be article(post) or page in the simple small Business website?
- Page template is accessing the incorrect posts?
- Is it possible to use WP_Query to only pull posts with attachments?
- disable Tab post on nav-menus page (Admin)
- Second get_permalink inside loop points to wrong URL
- How to make the home screen of my blog not show full posts?
- Best Way to Add UnEditable HTML to Posts
- Use Click Image to Play Youtube Video in a WordPress Loop
- Force a specific template as default
- Stop post submission without losing data?
- How to Rearrange WordPress Tags list on frontend using Shortcode with specific order?
- Site/Post preview is not working on all social media
- Add a field in my rest api
- How to hide protected posts from archive?
- “read more” redirects to the wrong page
- Settings missing from the add new post page
- Posting or Updating Article Fails on WordPress [closed]
- Replace Tag Keyword With Link Within Post Content
- New blog post published notification – Buddypress
- Custom post styling per category?
- What is the difference between options and custom fields (meta) in WordPress?
- Show posts from last 3 years in posts page
- Output wp_link_pages as raw url
- Display the latest post from some selected authors
- Add custom class to existing menu items from custom meta
- Post Publish Metaxbox on a Front End Page
- How do I display a full post, not just an excerpt?
- Stop Authors from submitting spam post
- Simple method to generate posts from files
- Published posts counter [closed]
- change page name on page list