Add custom URLs to WordPress’s XML sitemap

Sitemap Provider It’s possible to create a so called custom sitemap provider and register it with wp_register_sitemap_provider(). It’s helpful to look at the core setup, e.g. for the WP_Sitemaps_Posts provider and also the dev notes. Basic Example – Sitemap with custom URLs Here’s a very basic example that adds the wpse provider that extends WP_Sitemaps_Provider, … Read more

Exclude custom post_type in sitemap generation?

If you are using functions.php script to register custom post type, you should declare false to ‘has_archive’ => true,. function custom_post_type() { $labels = array( … ); $args = array( // you have to set it to False. ‘has_archive’ => false, ); register_post_type( ‘post_type’, $args ); } add_action( ‘init’, ‘custom_post_type’, 0 );

Uploading sitemap.xml

WordPress is set up in a way that mostly ignores existing files. If what you want is literally upload fixed sitemap.xml file you can just do that and upload it to the root of your site (using FTP, hosting control panel, or whatever). WordPress will just ignore it and it will be available at example.com/sitemap.xml … Read more

Is it safe to use ‘date_default_timezone_set’ in plugin file?

http://codex.wordpress.org/Function_Reference/get_gmt_from_date Replace all instances of get_the_date or the_date with echo get_gmt_from_date(get_the_date(‘Y-m-d H:i:s’)). That’s not a quick fix, it’s a way to fix your sitemaps. EDIT: WordPress SEO runs it’s raw dates from MySQL through a WP function called mysql2date, which in turn calls date_i18n. date_i18n happens to have a handy filter which you can tie … Read more

how can I check if I have sitemap?

Yes. Then it works. Add a new post and see if it changes. You can submit your sitemap to search engines but they will eventually pick it up regardless. Just give it time to see results — it’s not instant. Use Google Console https://www.google.com/webmasters/tools/sitemap-list to make sure it’s getting picked up.

How to consolidate all sitemaps in a multisite network?

WordPress multisite subdomains or suddirectories? I’m not sure if you’re getting the two confused. Multisite subdomains are basically fake subdomains that simply have a CNAME or A-Name record added in the DNS records. That said, and I believe one responder said this, you just need a sitemap for the root domain, and then you’ll have … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)