• Hi,

    We have some custom links that exist on:

    website.com/real_page/this_custom_page/
    website.com/real_page/this_other_custom_page/

    We’re wanting to either force add these custom pages to the sitemap… in a way that supports every single SEO plugin…

    Is there a hook that I can use to create pseudo posts/pages or force add to the sitemap (for all seo plugins?)

    Thanks

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    WP on its own doesn’t do sitemaps at all, so there’s no such hook in WP core. Influencing any possible SEO plugin would be very difficult. You might reasonably target the most popular ones. They might have some hook you could use in common, but I think it’s unlikely.

    Most sitemap plugins watch for a request for the sitemap file, which does not physically exist, so WP gains control of the request. The plugin somehow “sees” this request and serves the expected sitemap content. How a plugin sees a sitemap request can be done a number of ways, but there is likely a small number of hooks commonly used, “init” or “request” perhaps. Review the most popular plugins to gain more insight into how they do this.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding custom URLs to the sitemap / adding pseudo posts/pages’ is closed to new replies.