Site Map customization

This topic is: not resolved

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by Nicoma81 nicoma81 5 years, 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2665
    Nicoma81
    nicoma81
    Member

    Hello
    I am writing to see if you can delete menu items from the template SITE MAP.

    In particular I would like to exclude the voice AUTHORS and if possible also a specific page under the menu PAGES.

    I attach the link of the site for clarity
    http://www.carlobiagioli.com/site-map/

    Thanks for your help, Nico

    #2683
    Livemesh
    livemesh
    Keymaster
    Post count: 1011

    Yes, it is possible. You will need to create a new template file named template-sitemap.php in your child theme directory to replace the one in the parent and copy over the code contents from the parent and it’s referred file /framework/partials/sitemap.php. Or you can simply the edit the file /framework/partials/sitemap.php this way –

    Remove the lines 69 to 74 which read like this –

                

    < ?php echo __('Authors', 'mo_theme'); ?>

      < ?php wp_list_authors(array('exclude_admin' => false)); ?>

    and for excluding the pages, modify the line 60 –

    wp_list_pages(array('exclude' => '', 'title_li' => ''));
    

    as per the instructions provided here –

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

    Hope this helps.

    #2700
    Nicoma81
    nicoma81
    Member

    thanks for the help

    it works perfectly!

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

The topic ‘Site Map customization’ is closed to new replies.