This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Exclude pages from Sitemap template page

  • Creator
    Topic
  • #9867
    fusionx22
    Participant

    Hello, I have several pages that are used for content in custom layouts (builder). Can I exclude these from the Sitemap when using the Sitemap template?

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #9874
    Jason Bobich
    Keymaster

    Hello,

    That’s a great question. In order to edit the content of the sitemap template, you want to copy content-template_sitemap.php to your Child theme to customize it. Here’s more info on that general topic:

    http://dev.themeblvd.com/tutorial/editable-content-files/

    So in content-template_sitemap.php and find this part:

    <?php wp_list_pages('depth=0&sort_column=menu_order&title_li=' ); ?>

    And you could edit the actual query being passed to wp_list_pages()

    Say you wanted to exclude pages with ID’s 1, 2, and 3. You’d add &exclude=1,2,3 on there like this:

    <?php wp_list_pages('depth=0&sort_column=menu_order&title_li=&exclude=1,2,3' ); ?>

    http://codex.wordpress.org/Function_Reference/wp_list_pages#Exclude_Pages_from_List

Viewing 1 replies (of 1 total)
  • The forum ‘Akita Responsive WordPress Theme’ is closed to new topics and replies.