Skip to:
Content
Pages
Categories
Search
Top
Bottom

Members – Masonry


  • kmw1130
    Participant

    @kmw1130

    I’ve added a profile field to my members page and I’m using Masonry. I’m not familiar with php code and need to line up my Organization Field under the Member’s Name. It is displaying under their picture.
    How can I move it over under their name?
    Thanks
    Kim

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

  • Hastig
    Participant

    @hastig

    Is this to a single members full profile page?
    /wp-content/themes/themeName/buddypress/members/single/index.php

    Or to the page that lists multiple members?
    /wp-content/themes/themeName/buddypress/members/index-directory.php

    Wither way, I use masonry on both. If you showed your code I may be able to help.

    With my page layout I’m able to open the masonry div at the page top and close at at page bottom.

    Be sure to have the masonry block divs within that main, masonry div marked with the proper class.

    For starters, wrap the members photo (avatar) and Organization field in a div.

    Make each div display as block.

    Basic example..

    <div style=”display: block;”>
    <div style=”display: block;”><?php bp_member_avatar(‘type=full’); ?></div>
    <div style=”display: block;”><?php bp_member_profile_data(‘field=Organization’); ?></div>
    </div>

    Remember to replace the php with what you’re using on your site. (field name and avatar type, specifically)


    kmw1130
    Participant

    @kmw1130

    Here is my code. It is on the Members Page
    if ( function_exists(‘bp_is_active’) ) {
    if ( bp_has_members( $params ) ){
    ob_start();
    echo ‘<div class=”wpb_wrapper”>’;
    echo ‘<div id=”members-dir-list” class=”members dir-list”>’;
    echo ‘<ul id=”members-list” class=”item-list row kleo-isotope masonry ‘.$class.'”>’;
    while( bp_members() ) : bp_the_member();
    echo ‘<li class=”kleo-masonry-item”>’
    .'<div class=”member-inner-list animated animate-when-almost-visible bottom-to-top”>’
    .'<div class=”item-avatar ‘.$rounded.'”>’
    .’‘. bp_get_member_avatar() . kleo_get_img_overlay() . ‘‘;
    if ($online == ‘show’) {
    echo kleo_get_online_status(bp_get_member_user_id());
    }
    echo ‘</div>’
    .'<div class=”item”>
    <div class=”item-title”>’
    .’‘. bp_get_member_name() . ‘
    </div>
    <div class=”profile_fields”>’.bp_member_profile_data( ‘field=Organizational Name’ ).'</div>’;
    ‘<div class=”item-meta”><span class=”activity”>’.bp_get_member_last_active().'</span></div>’;

    if ( bp_get_member_latest_update() ) {
    echo ‘<span class=”update”> ‘. bp_get_member_latest_update().'</span>’;
    }

    do_action( ‘bp_directory_members_item’ ); echo ‘</div>’;
    echo ‘<div class=”action”>’;
    do_action( ‘bp_directory_members_actions’ );
    echo ‘</div>’;
    echo ‘</div><!–end member-inner-list–>
    ‘;
    endwhile;
    echo ‘‘;
    echo ‘</div>’;
    echo ‘</div>’;
    $output = ob_get_clean();
    }`
    }
    else
    {
    $output = __(“This shortcode must have Buddypress installed to work.”,”k-elements”);
    }


    Hastig
    Participant

    @hastig

    without seeing your css i can give you an ugly, possible solution..

    (please backup that file before attempting the change)

    delete

    <div class=”profile_fields”><?php bp_member_profile_data(‘field=Organizational Name’); ?></div>

    replace

    <div class=”item-title”>
    <?php bp_get_member_name(); ?>
    </div>

    with

    <div class=”item-title”>
    <?php bp_get_member_name(); ?>
    <div style="display: block;"><?php bp_member_profile_data(‘field=Organizational Name’); ?></div>
    </div>

    you may want to change style="display: block;" to class="whateverName" and edit from your style sheet.


    kmw1130
    Participant

    @kmw1130

    I got it to work. I had to do this:

    .'<div class=”item”>
    <div class=”item-title”>’
    .’‘. bp_get_member_name() . ‘ <br/>
    <span style=”font-size: smaller;”>’;
    echo bp_member_profile_data( ‘field=Organizational Name’ );
    echo ‘</span></div>’;

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Members – Masonry’ is closed to new replies.
Skip to toolbar