Looking over the code I am seeing a couple of things that may be causing issues.
-
The single line comment ‘Repeat the process…’ is not being closed properly.
-
As you are creating multiple custom loops, it’s a good idea to reset the loops. You can do this by calling one of the below functions after each of your while loops.
wp_reset_postdata(); or wp_reset_query();
As belinus has pointed out, you should use wp_reset_postdata(); as you are using WP_Query.
You can read more about this here: https://codex.wordpress.org/Function_Reference/wp_reset_postdata and here: https://codex.wordpress.org/Function_Reference/wp_reset_query
I hope this information is enough to get things working the way you want.
Related Posts:
- Should we trust the post globals?
- Get first post from wp_query
- WP_Query: Why is sticky post not first item in loop?
- Query *only* sticky posts
- How do I reorder (pop and push) items from WP_Query?
- How to exclude latest x posts from a paginated query?
- Reverse chronology of post listing
- WordPress Number of Posts Not Changing With posts_per_page
- This AJAX Code Doesn’t Work – Looking for elegant solution
- Specific loop in Shortcode
- Search widget breaks when using multiple loops?
- Converting multiple loops into one single loop with pagination
- Display posts with comments closed, with pagination?
- Group posts by year in loop
- How would I get 1 latest post from a query for 5 posts?
- Loop through all product posts?
- WP Query – duplicated posts once including tags in search results
- Display post from current category and same tag?
- Why WP_Query(‘showposts=5’) shows only 1 post?
- Blog post per page setting conflicting with custom WP_Query?
- How to exclude latest x posts from a paginated query?
- WP Query – Posts Per Page not working in combination with category__in
- Pausing and Resuming WP_Query results
- How to : pagination in 3 different custom loops on the same page
- List authors with the last post title and order by last post date
- wp_query random post
- Possible to alternate between two loops
- How to get posts published on the latest date?
- Page and post loop same template
- Getting blog pagination to work on page set as front page
- Display current post position in Elementor Posts widget
- WP_Query: Show 10 posts in date order, first three random
- How to display post list in a table layout (multiple queries in single loop)
- Not all posts showing in query
- how to handle the loop using filling bootstrap grid structure?
- Custom WP_Query not working correctly
- WP_Query of Category Not Showing First Post
- Display 3 posts with different HTML markup using a loop
- While loop in functions.php outputting the_title() of each post on frontpage
- Display specific posts based on an ID of another post
- Numbered Pagination Showing The Same Posts After Altering WP_Query
- show loop id post , only first id can read
- Double loop output
- Loop through all posts showing duplicates
- Wp_query loop is not working as it should
- WordPress loop uses unmodified posts array, why?
- Advanced Post Display/Pagination/Ordering
- Why I obtain this WP_Query strange behavior trying to select posts having a specific tag?
- How to show the posts list into a static page? Problems to use the loop into a static page
- Adding a category at even positions on main loop with modified pagination
- Make assigning post to a specific category equivalent to assigning it to all categories
- How do I show the post title if an advanced custom field hasn’t been used?
- First post in loop displays twice
- posts_per_page – Repeats only first posts ‘post__in’ array
- Adding additional data to WP_Post object
- How set featured posts using checkbox in post edit screen?
- Most viewed post for the last 2 days using WP_Query
- Adding Post Counts to Menu (Nav) Programmatically?
- how to display full post with pagination on home page
- Double count view in archive.php
- Blogroll – Different layout for first post
- Automatic value for custom fields for posts
- Display post category in foreach loop with category link
- Display all posts that were published before full post on single.php
- Two loops, one AJAX loop, exclude posts in first loop from second loop, loops are in different files
- Lost draft under all posts and drafts
- Get user categories with most posts in it
- How to order posts by meta_value and title
- How to make a sum of all posts displayed in a loop
- First x post with another template then the others
- Loop parent terms {display posts} AND loop child terms {display posts}
- add bootstrap post slider with tabs
- Print out last 3 blogposts
- Add Blog to WP homepage Manually
- How to group only VISIBLE posts? [closed]
- Shortcode with ‘year’ parameter
- On what hook can I get the queried object’s final state?
- WordPress loop not working on static front page
- Get current taxonomy and display query accordingly
- Is there a function to get post info for any publish_status by post ID?
- Wp Query : Order by distance lat,lon
- Optimal WP Web App Backend for mobile app development
- Diffrent layout for posts [duplicate]
- query posts with selected post ids first
- How to get value of a selected option from select tag and use it in WP_query to filter posts?
- Counting Posts by Category
- show image gallery in archives or category page
- Page with Category Returning 1
- wp_query args with relation
- Get 5 most recent categories
- Show author bio box
- Use special template for the first post in the loop
- Creating Ordered Query using Meta_key
- WP Query between posts custom fields [duplicate]
- How to Include a common category in a custom Category Search
- Is there a way to separate wordpress titles from their posts?
- wp_query posts sorting doesn’t work
- When and how will php code in a user made WordPress page be executed?
- Trying to create shortcode listing custom posts, but formating not being included
- WP_Query post_tilte search in posts table