Hi, how would i go about this? can’t seem to find a solution anywhere,
i would like to create two separate member types and show them in a directory each for purely ‘online members’
Many thanks,
NickHi Nick,
Thank you for the question.Please allow me to check it. We might be able to update our shortcode and include the option for showing online users.
Regards
BrajeshGood morning, Brajesh.
Would you have a timescale for this?
Would love to implement this on my site 🙂
Hi Nick,
Sorry for the delaye.
@ravisharma checked the plugin today and found that you can usetype=online
in the current shortcode to find the online members(BuddyPress considers user online if they have been active in last 15 minutes. This duration can be customized via a hook).
Regards
BrajeshSorry, Brajesh, i didnt get back to you sooner to thank you (website troubles :D)
I pasted this shortcode:
[bpmtp-members-list member_type=male type=online]
Didnt seem to work, have i done it wrong?Many thanks,
Nick- This reply was modified 3 years, 11 months ago by Nick Tomlinson.
- This reply was modified 3 years, 11 months ago by Nick Tomlinson.
Hi Nick,
Thank you for the reply.By default BuddyPress will list any user who was active in last 15 minutes(even if logged out now) as online.
Is that happening or is it not doing that?
Thank you
BrajeshYes, Brajesh, its doing it!
I forgot about the last 15 minutes rule 😀 ( is it complicated to adjust that 15 mins down to say like 5 mins? )
Great support as always!
Hi Bick,
Thank you.Sure, you can use this code for changing the time.
/** * Change the number of minutes used as interval for considering user online. */ add_filter( 'bp_user_query_online_interval', function ( $interval_in_minutes ) { return 5;// 5 minutes. } );
Please put it in wp-content/plugins/bp-custom.php or your-current-active-theme/functions.php
Regards
BrajeshHi, Brajesh,
Thanks so much for the code
<?php // your php custom code goes below this line. /** * Change the number of minutes used as interval for considering user online. */ add_filter( 'bp_user_query_online_interval', function ( $interval_in_minutes ) { return 5;// 5 minutes. } );
Is this correct to make up the bp-custom.php file? Using Notepad +++ then saving as a php file & loading it to wp-content/plugins?
Seems to give my site a critical error, i must be creating the file wrongly,
Many thanks,
Nick
You must be logged in to reply to this topic.