Skip to:
Content
Pages
Categories
Search
Top
Bottom

How To Add Button Under Profile Card?


  • King Ding
    Participant

    @dazzerr

    Hello!

    I would like to add a button under members profile cards in the members directory that simply says “View Profile”. This button of course should link to their profile page.

    Here’s an image of the space that I’m referring to: https://imgur.com/a/6uoCXxd . On my card, it has the “Profile Settings” button by default. On everyone else card, I would like the button in question to appear.

    How is this possible?

    Thanks,
    – D

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

  • studiocrafted
    Participant

    @studiocrafted

    I suggest you make a file in your theme at the following location

    yourtheme/buddypress/members/members-loop.php

    In that file you if you didn’t already have one then you should be ok to add the following code inside that file.

    <?php
    /**
     * BuddyPress - Members Loop
     *
     * @since 3.0.0
     * @version 3.0.0
     */
    
    bp_nouveau_before_loop(); ?>
    
    <?php if ( bp_get_current_member_type() ) : ?>
    	<p class="current-member-type"><?php bp_current_member_type_message(); ?></p>
    <?php endif; ?>
    
    <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) ) ) : ?>
    
    	<?php bp_nouveau_pagination( 'top' ); ?>
    
    	<ul id="members-list" class="<?php bp_nouveau_loop_classes(); ?>">
    
    	<?php while ( bp_members() ) : bp_the_member(); ?>
    
    		<li <?php bp_member_class( array( 'item-entry' ) ); ?> data-bp-item-id="<?php bp_member_user_id(); ?>" data-bp-item-component="members">
    			<div class="list-wrap">
    
    				<div class="item-avatar">
    					<a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar( bp_nouveau_avatar_args() ); ?></a>
    				</div>
    
    				<div class="item">
    
    					<div class="item-block">
    
    						<h2 class="list-title member-name">
    							<a href="<?php bp_member_permalink(); ?>"><?php bp_member_name(); ?></a>
    						</h2>
    
    						<?php if ( bp_nouveau_member_has_meta() ) : ?>
    							<p class="item-meta last-activity">
    								<?php bp_nouveau_member_meta(); ?>
    							</p><!-- #item-meta -->
    						<?php endif; ?>
    
    						<?php
    						bp_nouveau_members_loop_buttons(
    							array(
    								'container'      => 'ul',
    								'button_element' => 'button',
    							)
    						);
    						?>
    
    						<a href="<?php bp_member_permalink(); ?>" class="button">View Profile</a>
    
    					</div>
    
    					<?php if ( bp_get_member_latest_update() && ! bp_nouveau_loop_is_grid() ) : ?>
    					<div class="user-update">
    						<p class="update"> <?php bp_member_latest_update(); ?></p>
    					</div>
    						<?php endif; ?>
    
    				</div><!-- // .item -->
    
    			</div>
    		</li>
    
    	<?php endwhile; ?>
    
    	</ul>
    
    	<?php bp_nouveau_pagination( 'bottom' ); ?>
    
    <?php
    else :
    
    	bp_nouveau_user_feedback( 'members-loop-none' );
    
    endif;
    ?>
    
    <?php bp_nouveau_after_loop(); ?>
    

    That should give you a “View Profile” Link.


    King Ding
    Participant

    @dazzerr

    Thanks @studiocrafted! Unfortunately however, that seems to have done nothing 🙁 Do you have any other suggestions?


    King Ding
    Participant

    @dazzerr

    Perhaps it’s a theme or plugin issue that I’m not aware of? I’ve tried to disable a few things but I can’t seem to find this Profile Button ????

    Feel free to take a look at my site to speculate


    studiocrafted
    Participant

    @studiocrafted

    Sorry without know what your theme structure looks like under the hood I can’t help you further.

    I did take a look at the site and they are doing custom stuff.

    So yeah, a bit stuck here. I am available for private work if you’d like to hire me to solve some of your design challenges.


    King Ding
    Participant

    @dazzerr

    Totally understood @studiocrafted. I suspected that that might be the issue. Please do let me know how I might get in touch with you should I choose to hire you for private work ????

    Thanks,
    – D


    studiocrafted
    Participant

    @studiocrafted

    Hi @dazzerr are you on twitter?


    King Ding
    Participant

    @dazzerr

    I sure am – /darrylsyms is my user. Not that I actively use it 😛


    studiocrafted
    Participant

    @studiocrafted

    I’ll give you a follow now. 🙂 Also sent you a message through your contact form yesterday.

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