• maorb

    (@maorb)


    I tried this plugin and noticed that when I publish a new post, there is a new sitemap file created, but it contains all relevant posts but not the most last post that was published.

    I checked this and noticed the problem is with an action call that is missing.

    In the google-news-sitemap.php file, at about line #213 there are these 4 lines –

    add_action('publish_post', 'write_google_news_sitemap');
    	add_action('save_post', 'write_google_news_sitemap');
    	add_action('delete_post', 'write_google_news_sitemap');
    	add_action('transition_post_status', 'write_google_news_sitemap',10, 3); //Future scheduled post action fix

    This line should be added to these –

    add_action('wp_insert_post', 'write_google_news_sitemap');

    After that, the last post will also be included in the google-news xml sitemap file.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Google News Sitemap Generator] Fix to not adding latest post to sitemap’ is closed to new replies.