Forums

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

  1. Will Norris
    Member
    Posted 3 years 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. Otto
    Tech Ninja
    Posted 3 years 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.

Topic Closed

This topic has been closed to new replies.

About this Topic