Notifications
Clear all

wpForo 1.x.x [Closed] How can I swtich off the XML sitemap

9 Posts
4 Users
0 Likes
4,039 Views
Sofy
Posts: 4309
 Sofy
Admin
(@sofy)
Support Team
Joined: 6 years ago

Hi harveysamui,

I'm sorry, but there is no any option for this purpose. You need to add this code in your current active theme functions.php file. 

function custom_wpforo_seo_options($options){
$options['topics_sitemap'] = 0;
return $options;
}
add_filter('wpforo_seo_options', 'custom_wpforo_seo_options');

Don't forget to delete all caches (wpForo, other plugins) before checking. 

3 Replies
(@chs2019)
Joined: 5 years ago

Active Member
Posts: 10

@sofy

This does not work.  I disabled profile indexing & added the above code to functions.php.  I can still access the sitemap & the topics.  This is a private site.  I don't want it searched.  I am using wpForo 1.7.0.  Any other options?

Thanks

Alvina
Moderator
(@alvina)
Joined: 5 years ago

Member
Posts: 1869

@chs2019,

The code works fine.

It seems you've disabled the sitemap for topics, for example, but the sitemap page is enabled for the profiles or forum sitemaps. Thus the sitemap page exists.

Could you please leave the example URL to allow us to check it.

This is a private site.

In case if you say that the forum and topics are private, such topics and forums do not exist in the sitemap page(because the privates without codes). You just need to set all your forums "No Access" for guests.

Also, I'll suggest you read this FAQ topic, to get more info about the wpForo Usergroups, Forum Accesses, and WordPress User Roles: https://wpforo.com/community/faq/wordpress-user-roles-wpforo-usergroups-and-forum-accesses/

(@chs2019)
Joined: 5 years ago

Active Member
Posts: 10

@alvina

Thanks for your reply.  Guests have no access.  I'm seeing a lot of activity in the log files where bots have used the sitemaps to find user names and are poking through the site to get access to profiles, avatars, etc.  I'm trying to prevent direct access.

I changed the functions.php code to add profiles & forum sitemap (below), but I'm not sure if I used the right syntax & field names.  This appears to be working (unless it's just dumb luck :)), returning to the login screen.  Is this correct?

function custom_wpforo_seo_options($options){
  $options['topics_sitemap'] = 0;
  $options['profiles_sitemap'] = 0;
  $options['forum_sitemap'] = 0;
return $options;
}
add_filter('wpforo_seo_options', 'custom_wpforo_seo_options');
 
Thanks in advance for your help!
Page 2 / 2