How to add profiles to sitemap

Default WordPress sitemap

WordPress does not add all users to the sitemap. Only authors (users, who have posts) are added to the sitemap.

You can use a code snippet below to add all approved users whose Ultimate Member profiles are public to the sitemap. Just add this code to the file functions.php in the active theme directory. Skip the opening <?php tag.

This code replaces authors links with the Ultimate Member profile links in the default WordPress sitemap. This solution does not work with sitemap generated by third-party plugins.

NOTE: We have created this code example to provide guidance and to make it easier for you to implement this code into your website. However, we are not able to provide any support when it comes to customizing the plugin. If you need help implementing this code, please hire a developer.

Example - Users in the WordPress sitemap.


Yoast SEO sitemap

The Yoast SEO plugin generates its own sitemap that replaces the default WordPress sitemap. Use a code snippet below with the Yoast SEO.

Example - Users in the Yoast SEO sitemap.