Problem solved!
You need to change this part of code before 3rd query… it will merge you previous queries and exclude posts from them:
$first_grid_posts_ids = wp_list_pluck( $first_grid_query->posts, 'ID' );
$second_grid_posts_ids = wp_list_pluck( $second_grid_query->posts, 'ID' );
$allTheIDs = array_merge( $first_grid_posts_ids , $second_grid_posts_ids );
$third_grid_query = new WP_Query(
array(
'posts_per_page'=>4,
'post_type' => 'post',
'cat' => get_query_var('cat'),
// Add the post ids from the first and second loop
'post__not_in' => $allTheIDs
)
);
Related Posts:
- Inject post (from specific category) between posts in Loop
- User Defined order on get_categories?
- Custom Loop through category menu to include sub categories
- How to exclude specific category from the get_the_category(); array
- Filter Select results based on selection
- Alert Bar section within WP loop is displaying even though there are no posts
- Display category name only once inside loop
- I’m trying to create an array with a foreach loop, but the array only stores the last item [closed]
- How do I remove a category from a wordpress loop>
- How to get the last category name of a child category?
- How to get current post category details inside “loop”?
- Echoing a CSS class based on category of post in a list
- Do not duplicate posts with multiple categories in multiple loops
- Return to the beginning of the results of a for loop
- Exclude category and post from loop in custom category.php
- Error trying import one category on page
- Remove the_content From Loop
- Display current category title on category page
- Installing wp3.2.1 on IIS; getting empty sessions
- Want to separate sections of posts. Can you restart loop?
- List all categories but exclude current post category on single post page
- Specific Loop For 2 Within Each
- Two posts in same div – WP loop
- Woocommerce, recognize the loop of related products
- Edit category output
- Easiest way to show total number of subpages
- Different background-image by category
- Output 2 items within the Loop
- Get posts with at least one category in common with current post?
- How can I add pagination and how can I change thumbnail size?
- Display post category in foreach loop with category link
- Show css depending on activity type in BuddyPress activity-loop [closed]
- how do I get a specific post from a post with a subcategory in WP
- WP grandchild categories in nested ul li
- How to show single category archive
- How to pick the default selected value in wordpress dropdown?
- Get page that displays all children of taxonomy parent
- Increase offset while looping
- Counter in loop in foreach
- remove post that has no content
- Checking array against author id in loop
- How do I Turn This Into An if statement?
- Widgets in the loop if active
- Dilemma of Populating all the categories in a drop down list
- JSON REST API WordPress only showing first 10 categories
- How to get post ID in a Page?
- PHP Warning: strip_tags() expects parameter 1 to be string?
- Echo a shortcode div after every 3 posts
- Get all categories post is not in
- Rewrite with pagination /foo/page/2/ to posts of a given category, page 2
- Show ACF field with link to ultimate member profile/WordPress user profile below the post (single post layout)
- Only show first image in foreach loop
- How to pass current loop data into nested loop
- Post not populating for custom post type based on category selection
- WP_Query multiple post results
- Convert Featured products loop into Recent products loop?
- Posts are not looping through correctly
- Limit tags shown in post
- Create Div Wrapper On 3rd Iteration Or When Query Loop Items Run Out
- WordPress custom taxonomy
- pagination broken – clicking next displays “page not found”
- Compare current post Category in select menu
- Add class to every other posts using get_posts
- Wp Query : Order by distance lat,lon
- Remove Custom Post Category In WordPress Slug Using .Htaccess
- Woocommerce. Get a list of products in the current category on the archive page and product page
- How to Add a cutsom slug to my custom author role
- Give ID to divs inside the loop
- Add a “custom field” to a category that can be retrieved when viewing the category page with get_post_meta
- Allow two posts (from different categories) to have the same slug
- Get main parent category for post (WordPress/Advanced Custom Fields)
- Display articles with a different template in the home page | Solved |
- How to output the taxonomies that are assigned to each custom post?
- Category Page Displaying all Pages
- Looping through dummy posts and showing them in the main index.php
- Link to index.php from home.php?
- Custom Loop.php having a loop inside a loop
- ACF – Get ID of relationship field in flexible content
- Hide a specific category title from displaying on site
- WordPress Ajax filter: Create two loops for different output styles?
- How to display sticky post always at the top (before regular post) in wordpress?
- How to count posts posts if they are in a separate content page?
- Thumbnail wouldn’t scale to size properly
- Populate Posts based on category selected using AJAX that means without page refresh
- random woocommerce categories are not showing when count enabled?
- Customizing the output of the archive and category widget without altering the original behavior of the widget
- How to sort (orderby) a query done by a template function before the ‘foreach’ loop?
- How to Retrieve All Category Images on Front-End
- Add div after every 4 posts then every 2 posts for a responsive loop
- Retrieving specific images from Media Library
- Custom Taxonomy Link Text Echo Name Not Slug
- Adding unique marketing messages between certain products whilst using isotope/Infinite Scroll
- Is there a way to randomize and connect a background and header image?
- the_post_thumbnail unless video id is added
- dynamically filter by category via sub-menu
- Get unique post in parent category
- Incomplete term slugs output from a foreach loop with get_the_terms
- WordPress post pagination on custom template not working
- Implement “No related posts for this entry” into the loop?
- Options.php loop won’t show!