• add_filter('bwp_gxs_external_pages', 'my_external_sitemap');
    
    function my_external_sitemap()
    {
    	$external_pages = array(
    		array('location' => home_url('link-to-page.html'), 'lastmod' => '06/02/2011', 'priority' => '1.0'),
    		array('location' => home_url('another-page.html'), 'lastmod' => '05/02/2011', 'priority' => '0.8')
    		// repeat this for any other pages you would like to add
    	);
    	return $external_pages;
    }

    I’m using the external pages’ sitemap feature, so far I managed to implement it exactly as that. Thanks to the tutorial found here: http://betterwp.net/wordpress-plugins/google-xml-sitemaps/#external_sitemap

    However this is my problem: I would be needing to add tens of thousands of URLs, which would mean I would have tens of thousands of extra lines on my functions.php – which would be a problem (functions.php’s filesize would be too huge)

    Is there a workaround it?

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Khang Minh

    (@oddoneout)

    Hi there, it’s been a while articlescholar :), great to see you’re still using BWP GXS.

    Are those external pages’ URLs having anything in common, or just a bunch of randomly generated pages?

    Thread Starter articlescholar

    (@articlescholar)

    It’s the best sitemap plugin there is 🙂

    Yep, they all come from the same domain with the same number of character string right after /

    it has this format:

    http://www.samedomain.com/1234567890
    http://www.samedomain.com/1234567891
    http://www.samedomain.com/1234567892
    
    and so on.
    Plugin Author Khang Minh

    (@oddoneout)

    Are these URLs stored somewhere in your database or as a file on your server?

    Thread Starter articlescholar

    (@articlescholar)

    Yes as a file actually. It’s actually on the same domain/wordpress installation, but it doesn’t go through traditional posting and therefore not in the database

    Plugin Author Khang Minh

    (@oddoneout)

    If those URLs are in a file on your server you can simply use fread (link) and pull URLs from it and add them to the sitemap. A few lines of codes would achieve that.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘External Pages’ Sitemap Multiple URLs’ is closed to new replies.