wp_sitemaps_posts_query_args WordPress Filter Hook

The wp_sitemaps_posts_query_args hook allows you to modify the query args used to fetch posts for the sitemap. This can be useful if you want to exclude certain posts from the sitemap or change the order in which they appear.

apply_filters( 'wp_sitemaps_posts_query_args', array $args, string $post_type ) #

Filters the query arguments for post type sitemap queries.


Description

Top ↑

See also


Top ↑

Parameters

$args

(array)Array of WP_Query arguments.

$post_type

(string)Post type name.


Top ↑

Source

File: wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.