Need to hide "last active" info

BP Profile Search Need to hide "last active" info

  • Author
    Post
  • #9082 Reply
    Jill
    Guest

    We 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

    #9083 Reply
    andrea
    Plugin Author

    Hi Jill,

    The ‘last active’ information is displayed by the BuddyPress template:

    wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/members-loop.php

    or 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.

    #9084 Reply
    Jill
    Guest

    Thanks I will try and find the reference. Do you know what it looks like and is it safe to just comment out that section?

    #9166 Reply
    andrea
    Plugin Author

    Yes 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>

    #9167 Reply
    Jill
    Guest

    OK 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!!

    #9168 Reply
    Jill
    Guest

    Actually I tried just removing it all together and that worked. Thanks.

    #9169 Reply
    andrea
    Plugin Author

    Great, I’m glad you found a working solution!

    #9222 Reply
    Tom
    Guest

    Jill,

    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.

    #9223 Reply
    andrea
    Plugin Author

    Hello Tom,

    I’m sure your post will help many readers. Thank you!

Reply to: Need to hide "last active" info
My Information