Make WordPress Core


Ignore:
Timestamp:
06/21/2022 01:16:10 PM (4 years ago)
Author:
audrasjb
Message:

Sitemaps: Remove duplicate sticky Posts from Sitemap Post Query.

This changeset sets the ignore_sticky_posts parameter to true in the default arguments passed to wp_sitemaps_posts_query_args.

Props RavanH, pbiron, swissspidy, audrasjb, SergeyBiryukov.
Fixes #55633.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php

    r52422 r53548  
    220220                'update_post_term_cache' => false,
    221221                'update_post_meta_cache' => false,
     222                'ignore_sticky_posts'    => true, // sticky posts will still appear, but they won't be moved to the front.
    222223            ),
    223224            $post_type
Note: See TracChangeset for help on using the changeset viewer.