Skip to:
Content
Pages
Categories
Search
Top
Bottom

Disable ‘Last Active’ time since member logged in?

Viewing 3 replies - 1 through 3 (of 3 total)

  • Varun Dubey
    Participant

    @vapvarun

    @stevie79 You can easily use custom css

    #buddypress span.activity {
        display: none!important;
    }

    stevie79
    Participant

    @stevie79

    Hi, that would make it hidden for Admin, too.

    I’d override the template by copying the existing template at wp-content/plugins/buddypress/src/bp-templates/bp-legacy/buddypress/members/single/member-header.php

    and adding it to my theme at: buddypress/members/single/member-header.php

    Add a permissions check around the block you’re wanting to restrict access to (something like this):

    
    <?php if ( bp_current_user_can( 'bp_moderate' ) ): ?>
    	<span class="activity" data-livestamp="<?php bp_core_iso8601_date( bp_get_user_last_activity( bp_displayed_user_id() ) ); ?>"><?php bp_last_activity( bp_displayed_user_id() ); ?></span>
    <?php endif; ?>
    

    Read more about the template hierarchy here: https://codex.buddypress.org/themes/theme-compatibility-1-7/template-hierarchy/

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar