• Hi,

    I would like to transfer the users avatar and drop down menu functionalities to the header.php file, so that I can disable the admin bar but have the functionality in the menu area of my website.

    What I know so far: The “class-wp-admin-bar.php” file “see (line 436) renders the admin bar and I can see the functions that renders the user avatar and the “howdy” message.

    All i need is just the user profile menu as stated above to show up in the header area of the theme with the functionalities it currently has.

    Thanks in advance for your help.

Viewing 1 replies (of 1 total)
  • Thread Starter srrajkumar

    (@srrajkumar)

    Posting it here if someone like me searching for it may help…. ??

    <div class="profile_u">
    <?php  if ( is_user_logged_in() ):
                    $current_user = wp_get_current_user();
                if ( ($current_user instanceof WP_User) ) {
                    ?>
    		  <section class="main">
    				<div class="wrapper-demo">
    					<div id="dd" class="wrapper-dropdown-5" tabindex="1"><?php echo get_avatar( $current_user->user_email, 70 ); echo $current_user->display_name ; ?><span class="arrow"></span>
    						<ul class="dropdown">
    
    <li><a>"><i class="icon-user"></i>Profile</a></li>
    <li><a>"><i class="icon-remove"></i>Log out</a></li>
    					</div>
    				?</div>
    
    			</section>
    
                <?php
                }
                endif; ?>
    
    </div>
Viewing 1 replies (of 1 total)
  • The topic ‘transfer WordPress Admin Bar "current user Avatar dropdown menu" in header.php’ is closed to new replies.