• Resolved aishfak

    (@aishfak)


    I need to know best way to add external pages into sitemap. I have submitted this issue one month ago but i still don’t have any solution. The plugin author said me to read
    add the external sitemap to the Yoast SEO sitemap index list.

    But this isn’t help full. I follow it and try to do same but i can’t the urls in the default seo by yoast map.

    Then i try to make a new sitemap called sitemap.xml at root directory and submitted to google webmaster which is indexed but i am getting following error message in admin area.

    The following file is blocking your XML sitemaps from working properly. Either delete it (this can be done with the “Fix it” button) or disable Yoast SEO XML sitemaps.

    Please help me this is serious a big issue for me. I should need to add my a lot of external pages into site map.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter aishfak

    (@aishfak)

    Finally i got some solution my self by using of filter wpseo_sitemap_index and here is full working code example.

    if( class_exists(‘WPSEO_Sitemaps’) ) {
    function add_tutorials_sitemap(){
    $add_tutorials_sitemap = ‘<sitemap>
    <loc>’ . get_bloginfo(‘url’).’/tutorials.xml</loc>
    <lastmod>2016-10-06T14:46:34+00:00</lastmod>
    </sitemap>
    ‘;
    return $add_tutorials_sitemap;
    }
    add_filter( ‘wpseo_sitemap_index’, ‘add_tutorials_sitemap’ );
    add_filter( ‘wpseo_enable_xml_sitemap_transient_caching’, ‘__return_false’ );
    }

    But when ai named xml to for example abc_sitemap.xml then it give me following error message.

    The following file is blocking your XML sitemaps from working properly. Either delete it (this can be done with the “Fix it” button) or disable Yoast SEO XML sitemaps.

    When i removed the _sitemap from the file name and keep it simply abc.xml than the error gone. Can you let me know why ? and does it still effect anything ?

    • This reply was modified 7 years, 6 months ago by aishfak. Reason: spell mistake
    leledt

    (@leledt)

    Hi aishfak , where do you put the code, in which file ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to include non-wordpress pages in sitemap’ is closed to new replies.