Exclude categories, pages or posts from sitemap

July 6th, 2010 in Support, Themes tutorials

First, you will need to open sitemap.php (located in the theme root).

Pages are displayed using a WordPress function. Around line 17 you will see something like this<?php wp_list_pages(‘title_li=’ ); ?>.

To exclude for example the pages with ID = 3 and ID = 5, you would have to modify the wp_list_pages functions like this :<?php wp_list_pages(‘title_li=&exclude=3,5’ ); ?>

The same goes for excluding categories ( WordPress function wp_list_cats – you can find this around line 28 ).

If you have any questions, address them in our support forums.

    Hummingbird Web Solutions Pvt Ltd. Copyright © 2014. Premium WordPress Themes - Terms & Conditions