Google XML Sitemaps
[resolved] BWP GXS: how to exclude a page from the sitemap (6 posts)

  1. Rudolph Smits
    Posted 1 year ago #

    I want to exclude a certain page from being put into the sitemap. Browsing this forum confuses me.

    It should be done by excluding the page number(s). But where to do so?

    I do also find a solution to add this function:

    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 (128,187,5339) ';
    return '';
    Is this the way to solve it? But in which file should I add it to?

    Thanks for your advise!

    Rudolph Smits, Netherlands

    Installed version: BWP GXS 1.2.2.


  2. sismaxis
    Posted 1 year ago #

    If you are using this plugin, in WP-admin just go in Settings > XML Sitemap Generator > Excluded Items section and list ID's for pages that you want to exclude from sitemap.

  3. Rudolph Smits
    Posted 1 year ago #


    Thanks for answering so quickly. But there is the reason for my confusion: there is NOT such a section as Excluded Items.

    I guess that with v 1.2.2. I have the latest version.

    Should it help when I delete the plugin and there-after re-install it? And doing so, do I lose then all my settings?

  4. Rudolph Smits
    Posted 1 year ago #

    Update: today upgraded to v. 1.2.3.

    No change in behavior or additional options.

  5. Arne Brachhold
    Plugin Author

    Posted 1 year ago #

    You have posted in the wrong forum. This forum is for this plugin, which includes the exclude option:


  6. Rudolph Smits
    Posted 1 year ago #


    Thanks, I can see what I did wrong.
    I will try again but this time on the right forum.

    Then the issue here can be closed.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google XML Sitemaps
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.