Viewing 9 replies - 1 through 9 (of 9 total)
  • Yeh thats what I face too…
    Unlike the previous version, it wouldn’t rebuild the site map automatically when exclude item changes. You need to build it manually to get the change effect.

    Thread Starter fedup1979

    (@fedup1979)

    Hi Biswajeet and thanks.

    I do rebuild but then pages are still on the sitemap…
    I’m wondering if I’m typing the ID properly. Just to be shure, the ID is something like /ID/ if the page to exclude is https://www.mydomain.com/ID/ right ?

    Again thanks !

    To get the correct post/page ID when you are using clean url mode -> just hover on Edit link to view the correct id.

    Hope that will solve the problem!

    Thread Starter fedup1979

    (@fedup1979)

    Thanks a lot,

    So now I’m sure to be typing ID properly but still nothing changes…

    Have an idea ?

    Thanks,
    Regards.

    Having exactly the same problem – won’t exclude any pages no matter what I input. I’ve spent more than an hour searching forums trying to see if there is a fix for this. Any help would be greatly appreciated!

    Thread Starter fedup1979

    (@fedup1979)

    Hi,

    Just add meta robots plugin, this way you can tell on each page whether it must be indexed or not by bots. Works fine.

    Hope it helps,
    Regards.

    Thanks for the tip! I installed the plugin and rebuilt the sitemap manually – several times – all of the pages are still there. (I’m trying to exclude sign-up confirmation pages etc)

    https://hunterphoenixcoaching.com/site-map/

    I’ve cleared the cache and used different browsers.

    Any other ideas would be really appreciated! Thanks a bunch.

    https://www.ads-software.com/extend/plugins/google-sitemap-generator/

    microberto

    (@microberto)

    Ditto here. This is a great plugin but needs a patch to work for pages to exclude.

    I just went through this and successfully excluded a few pages, and I’m using ‘post name’ for permalinks. The plugin code to exclude posts/page is as follows:

    if(is_array($excludes) && count($excludes)>0) {
           $where.=" AND ID NOT IN ('" . implode("','",$excludes) . "')";
    }

    ID refers to the post/page id from the wp_posts table in the wordpress database. This code basically takes all of the post IDs entered in the ‘exclude’ field and ensures that they are excluded from the sitemap creation. This means that nothing but a numeric post ID will work. If you have changed your permalink structure to something that hides the post id, you won’t have any idea what the id for a post or page is.

    If you know how to query the WordPress database from phpMyAdmin, MySQL Workbench, or the command line, then maybe you can skip the next step.

    Install and activate the SQL Executioner plugin.

    Then select Tools, then “SQL Executioner”

    You should see an input area at the top where you can enter a query. To find a post by post name, type:

    SELECT ID, post_name FROM $posts where post_name = 'post name'

    If you are using PHPMyAdmin, or MySQL Workbench, you can use:

    SELECT * FROM wordpress.wp_posts where post_name = 'post name'

    Where post name is replaced with the name of the post you are looking for. When you locate your post/page, note the corresponding ID.

    Open the Sitemap plugin and enter the post/page IDs as only numbers (no slashes), separated by commas. Hit Apply, manually rebuild your sitemap, and the posts/pages you entered should be excluded.

    Hope this helps!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Google XML Sitemaps] Exclude pages’ is closed to new replies.