WordPress.org

Support

Support » Plugins and Hacks » Using Root Relative With Yoast Sitemaps

Using Root Relative With Yoast Sitemaps

Viewing 1 replies (of 1 total)
  • Here’s a hack that’ll make this work with Yoast, but please note that this will only work if the only files with .xml extensions are your sitemap files.

    At the very top of plugin (sb_root_relative_urls.php) find this:

    add_action('plugins_loaded', array('MP_WP_Root_Relative_URLS', 'init'), 1);

    Change it to:

    if (!preg_match('/\.xml$/', $_SERVER['REQUEST_URI'])) {
      add_action('plugins_loaded', array('MP_WP_Root_Relative_URLS', 'init'), 1);
    }

    Basically it’s disabling the plugin if the requested URL ends with .xml

Viewing 1 replies (of 1 total)
  • The topic ‘Using Root Relative With Yoast Sitemaps’ is closed to new replies.