Function in register_sitemap not getting called
-
Adapting this code sample, I started with this code in my functions.php file:
function my_make_mycustom_sitemap() { /* some stuff here, including logging to a file */ } function init_do_my_sitemaps(){ global $wpseo_sitemaps; if (method_exists($wpseo_sitemaps, 'register_sitemap')) { $wpseo_sitemaps->register_sitemap('mycustom-sitemap', 'my_make_mycustom_sitemap'); } } add_action('init', 'init_do_my_sitemaps', 9999);
I’m logging to a file in both functions. I can see that the register_sitemap method is executing. However, the callback function named, my_make_mycustom_sitemap, never gets called. None of its logging ever gets written.
Any help would be greatly appreciated. Thanks!
- The topic ‘Function in register_sitemap not getting called’ is closed to new replies.