Notifications
Clear all

Script how to removed recently view by users?

6 Posts
5 Users
0 Likes
504 Views
nothere
Posts: 7
Topic starter
(@nothere)
Active Member
Joined: 3 years ago

how to remove recently view by users? I don't care particular about which user has seen the topic, for the purposes of this website, it is not necessary.

Recently viewed by users: admin 23 mins ago, okay 23 mins ago.

 

https://www.holyspiritforum.com/community/main-forum/question/

Topic Tags
5 Replies
Sofy
Posts: 4057
 Sofy
Admin
(@sofy)
Support Team
Joined: 5 years ago

Hi @nothere,

On Forum and Topic list you can see (x viewing) info next to titles. Also in a topic footer section you can see current topic viewers and recent viewers with an exact viewed date of each user. All these information are controlled by five options:

  1. Track Forum and Topic Current Viewers (Forums > Settings > Features Tab)
  2. Display Forum Current Viewers (Forums > Settings > Forums Tab)
  3. Display Topic Current Viewers (Forums > Settings > Topics & Posts Tab)
  4. Display Topic Recent Viewers (Forums > Settings > Topics & Posts Tab)
  5. Display Admins with Topic Viewers (Forums > Settings > Topics & Posts Tab)

 

Reply
JasonToth
Posts: 70
(@jasontoth)
Estimable Member
Joined: 1 year ago

Thank you for this, but my users asked if this could be also adjusted on how long it shows. Right now it is set for 1 hour, but how can I change this time amount it shows for? Say I only want to set it for 30 minutes? Thanks.

Reply
1 Reply
Robert
Admin
(@robert)
Joined: 6 years ago

Support Team
Posts: 9361

@jasontoth,

You can use this hook code in the functions.php file of your current active WordPress theme:

add_filter('wpforo_keep_visitors_data', function ($seconds){
return 1800; //30 minutes
});
Reply
Jones553
Posts: 1
(@jones553)
New Member
Joined: 1 year ago

I don't see where to restrict the visibility for "Recently Viewed" Opportunities in Classic OR Lightning as there is no Edit option next to that list view. Is there another way to edit

Reply
1 Reply
Robert
Admin
(@robert)
Joined: 6 years ago

Support Team
Posts: 9361

@jones553,

You can disable "Track Forum and Topic Current Viewers" option in Dashboard > Forums > Settings > Features Tab:

Or disable it by CSS code. Insert this CSS code in Dashboard > Forums > Settings > Styles > Custom CSS Code textarea, save it, delete all caches, go to forum front-end and press Ctrl+F5:

#wpforo #wpforo-wrap .wpf-topic-visitors {
     display: none;
}
Reply
Share: