Add new filter
-
Hi guys, there is a need for a filter for the sitemap. In one of my projects, I made a revision to your plugin to select posts by status, please include these changes in the next release.
File:
includes/modules/sitemap/providers/class-post-type.phpFunction:
protected function get_sql_where_clause( $post_types )Code:
$post_statuses = apply_filters('rank_math/sitemap/post_statuses', array('publish'), $post_types); $status = "{$wpdb->posts}.post_status in ( '" . implode("', '", $post_statuses) . "' )";
Thanks.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Add new filter’ is closed to new replies.