Skip to content

Commit

Permalink
v 3.17.2
Browse files Browse the repository at this point in the history
Sitemap :
- compatibility with WPUSEO : Remove pages hidden from search engines from the post list.
  • Loading branch information
Darklg committed Sep 25, 2024
1 parent 0a49443 commit adc0829
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wputheme",
"version": "3.17.1",
"version": "3.17.2",
"description": "WPUTheme",
"devDependencies": {
"gulp": "^4.0.2",
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Theme Name: WP Utilities Base Theme
Theme URI: https://github.com/WordPressUtilities/WPUTheme
Update URI: https://github.com/WordPressUtilities/WPUTheme
Description: A Framework WordPress Theme
Version: 3.17.1
Version: 3.17.2
Author: Darklg
Author URI: https://darklg.me/
License: GPLv2 or later
Expand Down
14 changes: 13 additions & 1 deletion tpl/sitemap/datas.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,19 @@ function get_pages_sitemap_child_of($post_type, $sitemap_pages = array(), $paren
$default_args = array(
'posts_per_page' => 500,
'post_status' => 'publish',
'post__not_in' => array(get_the_ID())
'post__not_in' => array(get_the_ID()),
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'wpuseo_hide_search',
'compare' => 'NOT EXISTS'
),
array(
'key' => 'wpuseo_hide_search',
'value' => '0',
'compare' => '='
)
)
);
$wputheme_homepage_id = -1;
if (get_option('show_on_front') == 'page') {
Expand Down

0 comments on commit adc0829

Please sign in to comment.