The sticky posts are prepended on the first paginated part of the home page, so try this:
add_action( 'pre_get_posts', function( $q )
{
if ( $q->is_home() && $q->is_main_query() && $q->get( 'paged' ) > 1 )
$q->set( 'post__not_in', get_option( 'sticky_posts' ) );
} );
to remove it from the other paginated parts of the home page.
Related Posts:
- pre_get_posts with get_posts
- How-to exclude terms from the main query the most performant way?
- “pre_get_posts” firing on every query
- Splitting the main query in multiple loops with query_posts and/or pre_get_posts?
- Query sticky posts with thumbnails
- How to change posts order on Category and Tag archives?
- WP_Query doesn’t get sticky post at the top, when used in a page template
- Store sticky post’s ids in a transient
- Can I set my WP_Query to be a Main Query?
- Show scheduled posts in main loop but not in WP_Query?
- WP Query – order posts by meta field first and then order the rest
- How to remove only the latest sticky post from the loop
- How can I have sticky posts while ALSO showing posts from a specific category using one WP_Query?
- Can I alter the main loop to ‘orderby’ a custom callback?
- WP_Query causing links to not work
- Multiple loops on index page with sticky post and pagination
- First post outside of loop, homepage only?
- How can I display sticky posts at first in wp_query?
- When to use WP_query(), query_posts() and pre_get_posts
- Should I use Pre Get Posts or WP_Query
- Can I force WP_Query to return no results?
- Using pre_get_posts with WP_Query
- Resetting post data to previous loop in nested loops
- Some doubts about how the main query and the custom query works in this custom theme?
- Get post count of current loop when using multiple queries on one page
- why ignore_sticky_posts in sticky post query
- Multiple WP_Query loops with Pagination
- Using a custom WP_Query with get_template_part loop
- WP_Query orderby post__in remains ineffective in the Loop [closed]
- WP_Query vs get_posts
- What is “main query”? [duplicate]
- Loop within a loop?
- WP_Query and next_posts_link
- Show posts without term
- Usage of the new “posts_clauses” filter in WordPress 3.1?
- Display products from specific category in shop page
- How to list some posts first in the loop based on post id
- WP_Query: Why is sticky post not first item in loop?
- Reduce or prevent calling of update_meta_cache
- How to add taxonomy filter on the query fly?
- Pagination returns 404 after page 20
- Make loop display posts by alphabetical order
- Query *only* sticky posts
- WP_Query: query posts by ids from array?
- Use WP_Query with have_posts()?
- Changing the meta_query of the main query based on custom query_vars and using pre_get_posts
- get custom post type by tag
- How to get order of posts?
- Order posts by ID in the given order
- How to uniquely identify queries?
- Order Search Results Page by meta_value If no Value Return Remaining Results
- Sticky Posts & Posts Per Page [closed]
- Too slow when using both ‘tax_query’ and ‘meta_query’ both in WP_Query
- get_template_part in for loop
- Get array of posts from the current archive page loop
- Pagination with WP_Query is buggy – working for some pages, but not the others
- Get the number of posts from the current page results
- Changing Posts Per Page and offset with pre_get_posts
- How to exclude latest x posts from a paginated query?
- Executing Queries in tag.php
- Display posts the match taxonomy term linked from wp_list_categoies?
- How can I save an array from a random post sequence for later use?
- How to place a loop within another loop?
- WordPress Custom Query to show posts from last x years
- How to order posts tag by tag?
- Slow SQL_CALC_FOUND_ROWS Query
- Query Custom Meta Value with Increment
- Show two random posts from custom post type
- RSS feed with specific keyword
- Add the “active” class only to the first loop item in a WordPress query [closed]
- Loop through all tags & output posts in alphabetical list
- Pagination with 5 posts per page
- Identify which loop you are hooking into; primary or secondary?
- Using is_main_query to select custom post type on certain page
- In loop: posts have thumbnail AND other variables
- Multiple orderby parameters in pre_get_posts() action
- Group posts by custom field
- WordPress Number of Posts Not Changing With posts_per_page
- How to order category.php loop by ‘meta_value’?
- SQL Statement generated by WP_Query not producing expected results
- Pagination/infinite scroll with WP_Query and multiple loops
- Merging a complex query with post_rewind and splitting posts into two columns
- Sort posts by custom taxonomy name
- Add inline HTML to posts published within last 24hrs
- Move posts to top of WP_Query if in certain Taxonomy?
- wp_query for the first sticky, then display the rest of the posts excluding the first sticky
- Sorting Posts by custom field
- How to pass custom parameter to WP_Query for filtering in pre_get_posts
- Loop inside the loop
- Query with pre_get_posts to get pagination
- Pagination Not working on Home Page with 2 Query
- Recommended way to drop a pending query (in pre_get_posts)?
- meta_query not working properly
- Ajax Infinite Scroll In Custom WP_Query Loop Not Working
- Single page theme that uses pages for the content
- All sticky posts are returned in custom query
- Display different number of posts from one category on the different pages
- Looping through tabular data
- Trying to list out child pages with WP_Query
- Exclude post on loop by multiple meta key value