• I am trying to add a subdirectory of non-wordpress pagesto the sitemap. They are generated dynaically in /docs and cached copies exist at /docs-cache I do all this vis a plugin. I am scraping another site to get this info. All the pages render fine but I can’t get the BWP Sitemap to show these pages. I have implemented the following hook like so:

    …`
    add_filter(‘bwp_gxs_external_pages’, ‘starquestDocSync::integrate_sitemap’);

    static function integrate_sitemap()
    {
    $html = file_get_html(‘https://docs.starquest.com/sitemap.shtml’);
    $i=0;
    $sitemap_locations = Array();

    while($html->find(‘a’, $i) !== null)
    {
    $href = $html->find(‘a’, $i)->href;

    if(stristr($href, ‘docs.starquest.com’) !== false) {
    $href = str_replace(‘docs.starquest.com’, self::$base_url . ‘/docs’, $href);

    $sitemap_locations[] = Array(
    ‘location’ => $href,
    ‘lastmod’ => date(‘c’),
    ‘frequency’ => ‘auto’,
    ‘priority’ => ‘1.0’
    );
    }
    }

    return $sitemap_locations;
    }`

    I have also checked the “Enable External Sitemaps” on the wp admin console. Yet no evidence of these files shows up. In the sitemap log the following message appears:

    Requested sitemap (page_external.xml) was not found or not enabled.

    Does this mean I have to add a module for the external sitemaps? I dont need db access to generate them, and I’d prefer to keep the code in my plugin. Is there something I’ve missed?

    https://wordpress.org/plugins/bwp-google-xml-sitemaps/

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

    (@conryf)

    Bump. Any help?

    Checking the box “External” under “Sitemaps to generate” and saving, doesn’t work. Also the buttons “Add new page” and “Show/Hide External Pages” are unresponsive.

    Plugin Author Khang Minh

    (@oddoneout)

    Hi there, sorry for my late reply.

    Is your sitemap located at http://starquest.com ? As per the sitemap protocol (http://www.sitemaps.org/protocol.html#location), all links in your sitemap must have the same host as the sitemap itself (starquest.com in this case). For such reason your external page sitemap will be blank because all urls are excluded.

    I believe there’s a way to work around this issue, but I haven’t got the time to investigate yet. Will let you know the soonest.

    Regarding the unresponsive buttons, can you contact me via https://betterwp.net/contact/ so I can take a look? Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem Enabling External Page Sitemap’ is closed to new replies.