Skip to:
Content
Pages
Categories
Search
Top
Bottom

Placing profile avatar in item-nav

  • @israel4lincelot

    Participant

    Hi!

    I’m having some hard time with the following:

    I want to place my profile avatar (item-header-avatar) from the header to the left from my item-nav and eventually delete the header section.

    I’m editing the member-header.php file through my child-theme ( using Kleo-theme ). I thought it would be as easy as copying the div from item-header-avatar and pasting it after <ul class=”responsive-tabs”> but after loading the webpage it does not work.

    So my code looks like this:


    <?php

    /**
    * Fires after the display of a member's header.
    *
    * @since 1.2.0
    */
    do_action( 'bp_after_member_header' ); ?>

    <?php if ( sq_option( 'bp_nav_overlay', 0 ) == 1 ) : ?>
    <div id="item-nav">
    <div class="item-list-tabs no-ajax" id="object-nav" aria-label="<?php esc_attr_e( 'Member primary navigation', 'buddypress' ); ?>" role="navigation">
    <ul class="responsive-tabs">
    <div id="item-header-avatar" class="rounded">
    ">

    <?php bp_displayed_user_avatar( 'type=full' ); ?>


    <?php do_action('bp_member_online_status', bp_displayed_user_id()); ?>
    </div><!-- #item-header-avatar -->

    <?php bp_get_displayed_user_nav(); ?>

    <?php

    /**
    * Fires after the display of member options navigation.
    *
    * @since 1.2.4
    */
    do_action( 'bp_member_options_nav' ); ?>

    </div>
    </div>
    <!-- #item-nav -->
    <?php endif; ?>

    Thankyou!!

Viewing 11 replies - 1 through 11 (of 11 total)
  • @prashantvatsh

    Participant
    <div id="item-header-avatar" class="rounded">
    ">
    
    <?php bp_displayed_user_avatar( 'type=full' ); ?>
    
    <?php do_action('bp_member_online_status', bp_displayed_user_id()); ?>
    </div><!-- #item-header-avatar -->

    Just paste this line after do_action( 'bp_member_options_nav' ); ?> and it will come next to menu but may be you need to style it.

    Thanks

    @israel4lincelot

    Participant

    Hi,

    I’m adding this after that line but it still does not appear. I’m inspecting the code when reloading and there’s nothing there. Indeed with some CSS I can place it right where I want it but it has to appear first.

    Any other solutions?

    Thx!

    @prashantvatsh

    Participant

    Needs more debugging, please try just after or before <?php bp_get_displayed_user_nav(); ?>

    Thanks

    @israel4lincelot

    Participant

    Hi!

    I’ve added it before and after but it still doesn’t work.

    What’s the next step?

    Thx!

    @prashantvatsh

    Participant

    Have you checked again? Maybe it is there and hidden using CSS. It seems not possible that it will not appear.
    Any screencast or screenshot will help to explain more.

    Thanks

    @israel4lincelot

    Participant

    Hi!

    So I added it everywhere possible as seen here: Screenshot member-header.php

    I think there’s no CSS hiding it. Even if there was it should print something when inspecting the elements right? Screenshot Inspected elements

    Thx!

    @prashantvatsh

    Participant

    Whenever you are adding to any other place, please remove from the first place and then only paste it on second place.

    Thanks

    @israel4lincelot

    Participant

    Not working yet.. What can be the issue?

    @prashantvatsh

    Participant

    Your code is not looking like this: https://pastebin.com/7a4yZ800

    @israel4lincelot

    Participant

    No my code is from the file member-header.php * Buddypress – Users Header.
    What you sent me is from * Groups Home.

    This would be my code: https://pastebin.com/ck2wDwE2

    Thx!

    @prashantvatsh

    Participant

    I need to check the theme code, have you tried asking in their support forum https://seventhqueen.com/support/ ?

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