Skip to:
Content
Pages
Categories
Search
Top
Bottom

Remove avatar and navigation from user pages


  • project_subdomain
    Participant

    @project_subdomain

    Hi!
    When clicking through bbpress user pages (profile, edit profil, subscriptions etc..) the avatar and the user navigation will be displayed on the left side on all those pages by default.

    How can I remove avatar’s and user navigation’s div from all pages except the user’s profile home page to get more space?

    Tried this in user-details.php, did not work (blank screen):

    <?php if ( bbp_is_user_home() ){ ?>
    <div id="bbp-user-avatar">
    [...]
    </div>
    <div id="bbp-user-navigation">
    </div>
    }

    Thanks in advance!

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

  • project_subdomain
    Participant

    @project_subdomain

    got it to work with some messy beginners’ change of content-single-user.php right after <div id="bbp-user-wrapper"> with:

    <?php if ( bbp_is_single_user_profile()       ) bbp_get_template_part( 'user', 'details');  ?>
    <?php if ( bbp_is_single_user_profile()       ) bbp_get_template_part('user', 'profile'); ?>
    
    <?php bbp_get_template_part( 'user'); ?>
    
    		<div id="bbp-user-body">
    			<?php if ( bbp_is_favorites()                 ) bbp_get_template_part( 'user', 'favorites'       ); ?>
    			<?php if ( bbp_is_subscriptions()             ) bbp_get_template_part( 'user', 'subscriptions'   ); ?>
    			<?php if ( bbp_is_single_user_topics()        ) bbp_get_template_part( 'user', 'topics-created'  ); ?>
    			<?php if ( bbp_is_single_user_replies()       ) bbp_get_template_part( 'user', 'replies-created' ); ?>
    			<?php if ( bbp_is_single_user_edit()          ) bbp_get_template_part( 'form', 'user-edit'       ); ?>
    			
    		</div>
    	</div>
    </div>

    may need new css-styling.

    Could anyone tell me, how to improve the coding part to avoid the repetition of
    <?php if ( bbp_is_single_user_profile() ) bbp_get_template_part('user', ' ?


    Robkk
    Moderator

    @robkk

    Could anyone tell me, how to improve the coding part to avoid the repetition

    using PHP variables might help

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