Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #17176

    Hi,

    how can I exclude certain pages, categories and/or tags from the archive/sitemap?

    Can I do this in – what – theme file and which with code?

    Or can you recommend a good plugin for this?

    The “Simply Exclude” plugin, that I have, can only exclude a page from “search” and from “Pages – Widget”.

    Thanks a lot.

    #94451

    Hi colorit2,

    Try to use this plugin: http://wordpress.org/extend/plugins/page-list/

    Just check their documentation on how to exclude pages. :)

    Regards,

    Ismael

    #94452

    Thanks, but as far as I have understood here, I can create with it my own sitemap for example.

    But I won’t get lost of the good template from CORONA, showing the archive/sitemap like in the demo here and won’t “hardcode” the theme files for every page I would like to exclude.

    Any other suggestions of someone?

    Thanks.

    #94453

    Hi colorit2,

    The Sitemap on the demo site only uses ‘Archives’ as its template and doesn’t have the ability to filter pages to be excluded from the sitemap. Let me tag the rest of the support, as the only thing I recommend to you now is using that plugin.

    Regards,

    Ismael

    #94454

    Hi,

    I took a look and can’t seem to find a plugin with that functionality.

    Why don’t you just make the pages you don’t want on the sitemap Private? This way people who know the URL can still get to the pages but they will no longer be listed on the sitemap nor in navigation (since you don’t want them in sitemap then I guess you wouldn’t want them in navigation either).

    Thanks,

    Nick

    #94455

    thanks, but this is no alternative, to set them to private, because these pages have their own sense, but need not to be accessible by a sitemap, for example my comment-subscription page, where the user can manage his subscriptions; this as “stand-alone-page” shown in the sitemap is not good. As well as I don’t want to show the Impressum page explicitely in the sitemap or any advertising page.

    If there is no plugin, is there a possibility in the archive/sitemap, to “hardcode”, to exclude special page IDs from the sitemap/archive?

    The old “Advanced Category excluder” was perfect for pages, too, but it is too old and doesn’t work with CORONA.

    #94456

    Hi,

    Well, you can view source on the sitemap that you don’t like, copy it to notepad, remove the links you don’t want and paste it into a regular page.

    Another option that’s even easier, would be to add a custom meta field called ‘exclude’ with value of 1 to pages and posts you want to exclude and on the page that generates the sitemap to prevent any post/page from being displayed that has exclude=1 metafield value. You only want to block pages and posts right? or categories, tags, custom taxonomies and post types too?

    Thanks,

    Nick

    #94457

    this is quite inconvenient, sorry, isn’t there a possibility to exclude within the archive/sitemap template PHP file the IDs of my certain pages, that should not appear in archive/sitemap? I don’t know the right syntax, but I’m sure, that there was something like that …

    I just want some, about 5, 6 pages to be excluded only from sitemap/archive, no posts, no categories, just pages.

    #94458

    Hi,

    Please make a backup copy, and open up template-archives.php located at the root of the theme, and find line 150,

    which looks like

    wp_list_pages('title_li=&depth=-1' );

    and change it to look like

    wp_list_pages('title_li=&depth=-1&exclude=1,2,3,4,5' );

    **Please replace 1,2,3,4,5 with the page ID’s that you want to *exclude* from your sitemap, there is no limit but they must all be pages.

    Thanks,

    Nick

    #94459

    that works like a charm, exactly what I have searched for, thank you very much!

    #94460

    Great! Good luck!

    Nick

Viewing 11 posts - 1 through 11 (of 11 total)

The topic ‘How to exclude pages/categories/tags from archive/sitemap?’ is closed to new replies.