Add custom URLs to WordPress’s XML sitemap

My WordPress site also incorporates some external non-WP content that is dynamically pulled into the page via shortcode. The content shown depends on a query string parameter. So from WP’s point of view, index is just a single page containing a shortcode; but in reality, when you visit index?x=1, index?x=2, index?x=3, etc. you get different … Read more

Exclude custom post_type in sitemap generation?

I want to exclude some specific post types from generating sitemaps in yoast seo plugin. Please provide suggestions to do this. Thanks in advance. 3 Answers 3 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 … Read more

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

I am using a sitemaps plugin which in very complex ways sets the timezone of <lastmod> (i.e. last modified time) for posts to GMT. Temporarily, until the plugin developer fixes it, I need to enforce a custom timezone on the plugin. The simple and straightforward way that I’ve found is to add something like date_default_timezone_set( … Read more

Does the ‘WordPress Order’ feature, within the WordPress Dashboard, have any impact on site architecture?

As you can see, within the image below, WordPress offers us to numerically arrange our Pages via a feature entitled ‘Order’. I have been using this as a means to help organise my Pages, for my own personal benefit. Does this feature have any impact on areas such as; Sitemaps, overall site architecture/hierarchy or even … Read more

Why do I get a 404 for my sitemap index after installing Yoast? [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for WordPress Development Stack Exchange. Closed 7 years ago. Improve this question I just installed the Yoast plugin on my WordPress blog, so that I can automatically create my sitemap xml. However when … Read more

How to generate/update a XML sitemap without plugins?

I like to hardcode everything on my WordPress websites, without using any plugins. Is there any way to generate or update my sitemap everytime I publish/update a post on one of my Multisite blogs, without using plugins? 4 Answers 4 The following code works right off the bat. Your sitemap will show up on: https://your-website-name.com/sitemap.xml … Read more