[Plugin: Google XML Sitemaps] Rebuilding sitemap via another plugin
-
Is it possible to trigger the sitemap to be rebuild via another plugin?
My own plugin creates some custom pages that are outside of the main WordPress table structure. I have successfully hooking into XML Google Sitemaps to add these pages to the xml sitemap that is outputted.
Is there a way for me to trigger the sitemap to be rebuilt automatically when content has been changed in my plugin? I haven’t tested this but I’m guessing something like this should work but just want to check this is the best way?
if ( class_exists('GoogleSitemapGenerator') ) { $gs = GoogleSitemapGenerator::GetInstance(); $gs->BuildSitemap(); }
- The topic ‘[Plugin: Google XML Sitemaps] Rebuilding sitemap via another plugin’ is closed to new replies.