BWP GXS: how to exclude a page from the sitemap
-
I want to exclude a certain page from being put into the sitemap. I feel very uncertain how to do this being afraid that making errors will lead to loss in Google positioning.
I have a theme-child (Waever) where I find the file ‘function.php’. Should I add the following code to this file?
add_filter(‘bwp_gxs_post_where’, ‘sitemap_where’, 10, 2);
function sitemap_where( $query, $post_type ) {
switch ( $post_type ) {
case ‘page’ :
return ‘ AND wposts.ID NOT IN (x,y,z) ‘;
break;
}
return ”;
}I should have expected an “exclude page” section in the BWP GXS-settings but did not find one. Did I miss something?
Regards,
Rudolph Smits, Netherlands
- The topic ‘BWP GXS: how to exclude a page from the sitemap’ is closed to new replies.