Forums

[Plugin: Google XML Sitemaps] use WordPress hooks for sitemap.xml (2 posts)

  1. wnorris
    Member
    Posted 11 months ago #

    Arnie, loved seeing that you are no longer building the readme.txt file statically, but are instead relying on WordPress hooks for that. Would love to see the same thing for sitemap.xml if you weren't already planning it. Perhaps use wp-super-cache if its present for caching the file, or just store it in /wp-content/cache/ yourself. Would much prefer to see my document root stay clear of any extra files if at all possible, and looks like you've proved it can be done with the readme.txt file. Keep up the good work on this.

    Side note, but you may want to look at http://php.net/version_compare for comparing wordpress versions. For example:
    if (version_compare($wp_version, '2.7', '<')) { }

  2. Otto42
    Moderator
    Posted 11 months ago #

    Bad idea from a speed point of view. Building the sitemap can take a super long time for a big site, so it wouldn't be a good idea to waste all those CPU cycles every time the sitemap was pulled. Better to generate it only when a new URL is added to the site, like a new post and such.

Reply

You must log in to post.

About this Topic