Skip to:
Content
Pages
Categories
Search
Top
Bottom

Remove Name Header


  • lukepls
    Participant

    @lukepls

    I am trying to remove the user name header from the friends/messages/settings pages and only have it remain on the profile page.

    I would like to achieve this somehow without CSS.

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

  • Prashant Singh
    Participant

    @prashantvatsh

    Hi,

    You have to check current component using the function bp_current_component() and you can find the component list here https://codex.buddypress.org/developer/bp-is-active/

    Thanks


    lukepls
    Participant

    @lukepls

    Thanks for your reply.

    That will help me determine the page I am on but what about the code to then actually hide the header.


    Prashant Singh
    Participant

    @prashantvatsh

    Hi,

    In nouveau template home.php is the file that you need to override in your child theme and then wrap this code: `
    <div id=”item-header” role=”complementary” data-bp-item-id=”<?php echo esc_attr( bp_displayed_user_id() ); ?>” data-bp-item-component=”members” class=”users-header single-headers”>

    <?php bp_nouveau_member_header_template_part(); ?>

    </div><!– #item-header –>`

    in the condition : if(!bp_current_component('your_comp_name') || !bp_current_component('your_comp_name') || !bp_current_component('your_comp_name'))

    Thanks

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