WordPress does not have relationship support among the posts. So for you to do that you have create a new table to store the post id and the linked post id. You need to do custom query every time that table needs to be updated.
Related Posts:
- Order post by year DESC and month ASC
- Exclude posts with empty post_content in wp_query
- Improving WP_Query for performance when random posts are ordered
- posts_per_page option limits the number of Gallery items
- Counter is skipping post when I still want it visible [closed]
- Query for first 3 posts to change the look and feel
- How to give classname to post if post has no content?
- How to fetch courses in all languages in WordPress?
- Show 5 posts and than 3 posts offset with pagination
- Querying posts from current category, using a variable as array argument
- Sort Events by Venue Title – Sort Post set by related post ids
- Sort / Filter Queries
- Query post category & remove any post id
- Ordering posts alphabetically by meta keys and title
- Why I obtain this WP_Query strange behavior trying to select posts having a specific tag?
- Why I have this strange behavior when I try to exlude the featured post from posts visualization?
- How to limit post query to only return a total count of items with certain post statuses?
- Sort Posts Alphabetically Based on Specific Category (Divi)
- How to limit the number of posts that WP_Query gets?
- Should we trust the post globals?
- Keep featured content post in homepage with original order
- How to get posts published between a date and today?
- Get the ID of the latest post
- How to show related posts by category
- Random sort within an already sorted query
- the_author() returns empty string
- how to get a different html for odd/even posts?
- Display all posts from specific categories on a page
- How to exclude latest x posts from a paginated query?
- How to know if get_posts() failed?
- Display content from a specific category
- How to display posts by current user/author in a custom page template?
- Using $wpdb to query posts with meta value containing current post_id
- post_name empty after wp_insert_post
- Query posts from current year
- Alter query on edit.php
- Query posts distinct authors
- How to get previous 10 days post from a specific date – WP Query
- Number of posts per page setting is not working?
- WordPress Number of Posts Not Changing With posts_per_page
- I have over 4000 posts, will querying some of them cause performance issues?
- Duplicate posts
- Looping through posts per category gives same posts for each category
- WordPress Posts Out Of Order after 3.1 Update
- How to show posts rank based on custom field value
- Query only Posts from Both of Two Category?
- Insert custom div between posts
- Can’t show comments count per post outside loop
- How do I create Comma Separated list of attached image ids?
- How to add posts to wp_query result?
- Only display posts with comments
- Trying to put an array into ‘post__in’ => array() query not working
- WordPress get posts by date without query_posts
- How to Display Post View Count
- Should ‘setup_postdata()’ be reset with ‘wp_reset_postdata()’?
- How can I display a specific user’s first published post?
- Different amount of posts on homepage than paged pages
- Query All users that has post
- Featured Posts for Category Pages
- wp_enqueue_media() slows down my WP site
- How can I get all posts data from within a paginated search result?
- Cannot Update A Post, 404 Error
- Function to show random posts from a category
- Search query – exact post title match
- Hiding posts in a list from specified categories
- Sorting posts alphabetical that have single digits
- Query posts from different categories in multisite
- Check if post exists
- posts_per_page doesnt work
- Sorting posts according to view counts not working
- How would I get 1 latest post from a query for 5 posts?
- Filter Posts By Tag
- Display page content AFTER a loop of posts
- Can I set and show “important” post in my blog?
- Only display posts after current date
- Get posts by multiple ID’s (query)
- How to start with post number x?
- Only display a certain number of posts, dependent on how many posts there are available in a query
- Should $found_posts be returned as string in ‘found_posts’ filter hook?
- Create dropdown list post
- I would like to give special promotion for the first 100 posts in my blog? Can anyone tell me how to do that?
- previewing my posts on static page?
- Exclude newest post from category X but show rest
- Reset Popular post query?
- Query how many items to show in shortcode
- Get posts by name and taxonomy term
- WP_Query Authors OR Categories
- Get Posts that are in the current month or later
- Inserting custom data to the_post() during loop
- How To Get Posts With A Specific Word
- Sticky post appears twice
- do_shortcode within post query
- How Can I Query a Specific Page From a MultiPage paginated Post
- Why WP_Query(‘showposts=5’) shows only 1 post?
- is there a way to show the the post title after the image?
- Get Meta Key Value While Saving Post
- Most liked page not displaying posts
- Display posts with tag that matches current post title
- Why is querying posts messing up my pages?
- Display all posts that were published before full post on single.php