From 215fb7ff0b6c893c6740dcb27875a3ebd13d53ed Mon Sep 17 00:00:00 2001
From: Paul Biron <paul@sparrowhawkcomputing.com>
Date: Thu, 28 Apr 2022 08:37:59 -0600
Subject: [PATCH] Ignore sticky posts by default in post sitemaps.
---
src/wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php b/src/wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php
index 61dffdbd79..b9f2fd3185 100644
a
|
b
|
class WP_Sitemaps_Posts extends WP_Sitemaps_Provider { |
219 | 219 | 'no_found_rows' => true, |
220 | 220 | 'update_post_term_cache' => false, |
221 | 221 | 'update_post_meta_cache' => false, |
| 222 | 'ignore_sticky_posts' => true, // sticky posts will still appear, but they won't be moved to the front. |
222 | 223 | ), |
223 | 224 | $post_type |
224 | 225 | ); |