BP Profile Search › Need to hide "last active" info
-
AuthorPost
-
Jill
GuestWe finally got the BP search working but we do not want the “last active” date showing. Our membership of inductees has many deceased and older, non-web using members and this info is unnecessary for us. Does it have to show? Here is the search link
http://avhof.org/members/membership-directory/Thanks
andrea
Plugin AuthorHi Jill,
The ‘last active’ information is displayed by the BuddyPress template:
wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/members-loop.phpor by a version of the same template contained in your active theme.
You have to edit that template and remove the info you don’t need.
Jill
GuestThanks I will try and find the reference. Do you know what it looks like and is it safe to just comment out that section?
andrea
Plugin AuthorYes you can simply comment out that section. If you are not using a custom template in your theme, that section is:
<div class="item-meta"><span class="activity" data-livestamp="<?php bp_core_iso8601_date( bp_get_member_last_active( array( 'relative' => false ) ) ); ?>"><?php bp_member_last_active(); ?></span></div>Jill
GuestOK It is a custom template and I found that PHP file in three places, BUT only one seems to affect the page BUT it adds the comment marks and doesn’t take out the info LOL
Here is the code
/* <div class=”item-meta”><span class=”activity” data-livestamp=”<?php bp_core_iso8601_date( bp_get_member_last_active( array( ‘relative’ => false ) ) ); ?>”><?php bp_member_last_active(); ?></span></div> */
Here is the page so you can see it.
http://avhof.org/members/membership-directory/Any ideas?
PS I didn’t build this site and I HATE IT!!Jill
GuestActually I tried just removing it all together and that worked. Thanks.
andrea
Plugin AuthorGreat, I’m glad you found a working solution!
Tom
GuestJill,
I just wanted to close the loop on why this didn’t work for you.
BUT it adds the comment marks and doesn’t take out the info LOL
The reason it adds the comment marks and doesn’t take out the information is because the
/* and */in your code below are happening OUTSIDE the php tags<?php ?>and are basically being rendered as HTML./* <div class=”item-meta”><span class=”activity” data-livestamp=”<?php bp_core_iso8601_date( bp_get_member_last_active( array( ‘relative’ => false ) ) ); ?>”><?php bp_member_last_active(); ?></span></div> */Additionally, I just wanted to remind you that if you edited the template within the plugin, your changes to that template will be lost when you update the plugin and you will need to remove that code again. To avoid this, create a folder within your theme and name it
“buddypress” (without the quotes) and then create a folder named
“members” (without the quotes) inside the new buddypress folder you just created. Now, copy the members-loop.php file from wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/members-loop.php and paste it into the new buddypress/members folder you just created.You can now edit that copy of the members-loop to your heart’s content and it will NOT be affected by buddypress updates.
I hope this helps.
andrea
Plugin AuthorHello Tom,
I’m sure your post will help many readers. Thank you!
-
AuthorPost