Back to top

Affiliate Link: Interested In a Useful Tables For Amazon Products and More? Check Out:

Amalinks Pro

Stop Acabado Auto Generating a Sitemap.xml

Featured Tiles
As an Amazon Associate we earn from qualifying purchases made on our website. If you make a purchase through links from this website, we may get a small share of the sale from Amazon and other similar affiliate programs. You can read our complete legal information for more details.

If you still choose to run a different plugin to manage the SEO or to assist you in your SEO attempts then having a theme overwrite the files you may make is probably high on your list to manage. Someone recently asked how to stop the automatic generation of the sitemap.xml that the theme does for you whenever a post, page or update occurs.

What I did was use Code Snippets to build a section of code that basically unloads those functions after they load, this makes the code no longer active which means no more updates will occur to the sitemap until you remove this code snippet from your site.

You will need to have some other software generate your sitemap and you will need to submit that sitemap to Google or risk losing that tie into Google and Bing or other search engines.

Code Snippet

The code snippet code below you can paste into a new code block or you can download the importable snippet here (right click and save as)

add_action('after_setup_theme', 'remove_parent_functions');

function remove_parent_functions() {
    remove_action('publish_post', 'income_school_create_sitemap', 10);
	remove_action('publish_page', 'income_school_create_sitemap', 10);
	remove_action('save_post', 'income_school_create_sitemap', 10);
	remove_action( 'publish_post', 'income_school_create_image_sitemap' );
	remove_action( 'publish_page', 'income_school_create_image_sitemap' );
	remove_action( 'save_post',    'income_school_create_image_sitemap' );
}

If you find a post helpful and feel like rewarding my effort with the price of a beer, please donate here

About Josh Koop

Hey Everyone! I hope that the short article you read today has taken you from a place of frustration to a place of excited anticipation for your visitors! Please let me know of anything you need for Acabado that can help you achieve your goals! Read More About Me...

My Posts | Website

Josh Koop

Hey Everyone! I hope that the short article you read today has taken you from a place of frustration to a place of excited anticipation for your visitors! Please let me know of anything you need for Acabado that can help you achieve your goals! Read More About Me...

2 thoughts on “Stop Acabado Auto Generating a Sitemap.xml

  1. Hey Josh, I have a doubt regarding the solution given in article.
    Exactly where to add the code snippet?….like on common head of each page or in body of all pages.

    1. You use the code snippets plugin, this plugin and the code inserts it where it needs to remove the code which renders the sitemap file.

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Content