Yoast SEO
[Plugin: WordPress SEO by Yoast] Display XML Sitemap in a page (6 posts)

  1. Marco Milesi
    Posted 3 years ago #

    Hello Everyone.

    Is it possible to put the XML Sitemap generated by the plug-in in a "Standard" page (or with PHP code) in WordPress?
    If Yes, How..?

    Thanks in advance!


  2. namebadgesdirect
    Posted 3 years ago #

    Similar problem.

    I want to view it in the browser... Why is this so hard for someone to show us how to view it in the browser or some other way?

  3. Marco Milesi
    Posted 3 years ago #

    I still need this help! Some months ago i tried some plugins, but i don't like to install too many of them so i need to view http://www.website.com/sitemap_index.xml in a standard page!

  4. twanny
    Posted 3 years ago #

    I cant believe that a simple option like displaying the site map in a page couldnt be incorporated in this plugin. !!! I am trying to keep the amount of plugins used in a website to a minimum but I am using plugin http://www.presscoders.com/plugins/simple-sitemap/ just to display the map. Would be nice if this functionality is included in WP SEO :)

    Many thanks for the plugin

  5. Marco Milesi
    Posted 3 years ago #

    Hi twanny!
    I asked that question 6 months ago... In this long time i've found a simple way without using any plugin!
    Maybe this could be helpful for you to solve the problem:

    // Add pages you'd like to exclude in the exclude here
        'exclude' => '',
        'title_li' => '',
    // Add categories you'd like to exclude in the exclude here
    $cats = get_categories('exclude=');
    foreach ($cats as $cat) {
      echo "<h3>".$cat->cat_name."</h3>";
      echo "<ul>";
      while(have_posts()) {
        $category = get_the_category();
        // Only display a post link once, even if it's in multiple categories
        if ($category[0]->cat_ID == $cat->cat_ID) {
          echo '<li><a href="'.get_permalink().'">'.get_the_title().'</a></li>';
      echo "</ul>";
      echo "";

    You can see the example here: http://goo.gl/2fisD

  6. kletskater
    Posted 3 years ago #

    how and where do I have to include this code?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yoast SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic