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?
- Some doubts about how the main query and the custom query works in this custom theme?
- Using a custom WP_Query with get_template_part loop
- WP_Query orderby post__in remains ineffective in the Loop [closed]
- Loop within a loop?
- WP_Query: Why is sticky post not first item in loop?
- Display posts the match taxonomy term linked from wp_list_categoies?
- SQL Statement generated by WP_Query not producing expected results
- Merging a complex query with post_rewind and splitting posts into two columns
- wp_query for the first sticky, then display the rest of the posts excluding the first sticky
- Pagination Not working on Home Page with 2 Query
- meta_query not working properly
- Exclude post on loop by multiple meta key value
- Sort by meta key on archive page
- Include Sticky Posts in Page Post Count for custom query
- Show all parents and children in custom post type in right order
- Why is this coming back as null? Thats wrong. There is one post
- Searching through different categories on different pages code is not working
- Ignore post by meta value in the main query
- How to retrieve current page WP_Query arguments?
- How to limit WP_Query to one result on the loop?
- How to choose between hooking into per_get_posts or into parse_query
- How to use offset in WP_Query
- new WP_Query to get max price meta value not working
- Multiple loops without repeating content
- Using meta_query with multiple keys and compare values
- Change query based on post type while staying in loop
- Get a list of posts with associated meta_value
- $WP_Query: How to display excerpt on first post only
- Order ascending is ignored in meta query?
- How to make search for posts using get method?
- How to get list of posts from permalinks?
- How Can I Change The Tax Query For The Main Loop For Taxonomy Archives?
- get_template_part causes 500 error
- how to use pre_gets_posts to exclude one queried ID from homepage loop
- WP_Query – Adding “offset” posts to the end of the loop
- Conditional operator OR not working with custom fields
- Get posts that do not have the same tags as current
- queried_object using pre_get_posts gets notices and warning
- date_query in pre_get_posts out of memory
- wp_query is showing posts from other categories
- Should I reset $wp_query?
- Exclude a Woocommerce product from WP_Query
- WP_QUERY wrong ammount of posts
- How to add sort order to incremented and paginated category loop
- Sorting search results with custom dropdown
- Expecting statement error from php loop using ACF plugin
- How do I sort this custom list of sticky posts
- Query only displays one page_id
- Get posts with no tags?
- I am officially missing something about transient posts
- How do I get the content of a custom instance of WP_Query?
- WP_Query, Paginate by Custom Field
- Block internal search queries with pre_get_posts and regex rules
- is_user_logged_in not working from WP-API (wp-json)
- Search Exact on WordPress – Relevannsi Solution Not Working
- ACF: How can I publish values of ACF fields in a loop while using wp_query?
- Show a message if there are no active posts in category
- How can I re-query post_type and rewrite the url?
- How to display sticky post always at the top (before regular post) in wordpress?
- Problem with my loops
- Staggering featured post using ‘sticky’
- display the children of the post using the current page as the main parent
- Display 3 levels of categories on page
- Paging works correctly on local version, but not live?
- Custom post type loop error: Trying to get property of non-object
- How to add in WP_Query to every 3 posts displayed? [duplicate]
- Modify query to exclude certain ids and certain parents and its corresponding children
- How to make a wordpress loop file that displays posts based on certain conditions
- Custom loop – Isolating post meta output depending on current query taxonomy terms
- Issue in If else condition [closed]
- Pagination not working with WP_QUERY
- How do I display posts with specific value in a custom field into my loop?
- Order by multiple meta keys on wordpress
- Sort posts in dashboard using custom field; also include posts where field isn’t set
- wp_query pagination links producing 404
- Display First posts without the default featured image
- Custom post types loop on a page template
- Pagination problem with multiple loops on the same page
- Can’t seem to get an else statement correct? [closed]
- Output ACF field dynamicaly within a taxonomy loop [closed]
- How do I split a large query with a semi-expensive function included into multiple smaller queries
- Query All Posts: Either Display Most Recent or One with Particular ACF Value Chosen