Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • kmw1130
    Participant

    @kmw1130

    Is there a way to use members of a group on my Team Page?


    kmw1130
    Participant

    @kmw1130

    The Team Page (support-team) is located under the About Us page.

    And I’m trying to add the Members Masonry Element to my support team page.

    I tried the code and the I indicated are not showing.


    kmw1130
    Participant

    @kmw1130

    How did you solve this? I want to filter members for a Team Page.

    Thanks
    Kim


    kmw1130
    Participant

    @kmw1130

    It seems like any changes I make to the members-loop.php file doesn’t make a difference, so it makes me wonder if I am updating the correct file. (wp-content\child-theme\buddypress\members\members-loop.php) is the members-loop file I’ve updated. As well as my child-theme function and child-theme\buddypress\members\index.php.


    kmw1130
    Participant

    @kmw1130

    I added this to members-loop:

    <?php /* Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter() */ ?>
    <?php do_action( 'bp_before_members_loop' ) ?>
    
    <?php
    if ( bp_ajax_querystring( 'members' ) ==""){
    $queryString = "type=alphabetical&action=alphabetical&page=1";}
    else {$queryString = bp_ajax_querystring( 'members' );}
    ?>
    
    <?php if ( bp_has_members( $queryString) ) : ?>
    
    <strong>Index.php</strong>
    
    <select id="members-order-by">
    	<?php if ( bp_is_active( 'xprofile' ) ) : ?>
    		<option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
    	<?php endif; ?>
    		<option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
    		<option value="newest"><?php _e( 'Newest Registered', 'buddypress' 
    
    Functions.php (child theme)
    /** Sort alphabetical name listings by lastname */
    function alphabetize_by_last_name( $bp_user_query ) {
        if ( 'alphabetical' == $bp_user_query->query_vars['type'] )
            $bp_user_query->uid_clauses['orderby'] = "ORDER BY substring_index(u.display_name, ' ', -1)";
    }
    add_action ( 'bp_pre_user_query', 'alphabetize_by_last_name' );

    Is that correct?

    Thanks
    Kim


    kmw1130
    Participant

    @kmw1130

    And the change is added to the members-loop.php page, correct? also changed the order in the index.php file, neither seem to make a difference for me. Maybe I’m missing something.

    Thanks
    Kim


    kmw1130
    Participant

    @kmw1130

    I tried the solution mentioned and still not sorting alphabetically, the dropdown defaults to Alphabetical, but doesn’t sort. Is it necessary to add the code to the function.php file, I’d like to see it sort alphabetically by firstname to know that it is working.


    kmw1130
    Participant

    @kmw1130

    Ok, will do. Didn’t realize that, but since I was using BuddyPress to display my events, I wasn’t sure which plug-in.
    thanks
    Kim


    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>’;


    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”);
    }


    kmw1130
    Participant

    @kmw1130

    I was able to get a field to display, but it only displays on the Member’s profile page and I want it to display on the members page where all the members are shown. I’ve updated the members-header.php page, so maybe there is another page that needs to be updated.


    kmw1130
    Participant

    @kmw1130

    If I don’t use the BuddyPress Group Extra, how do I add an icon to my group navigation? where are these set (Activity, Events, Members)? Maybe if I can see where to set these, I could figure out how to add additional icons.

    Thank you,
    Kim


    kmw1130
    Participant

    @kmw1130

    Ok, will do. Didn’t realize it wasn’t the same or if I’m referring to the correct Navigation.

    Thank you.


    kmw1130
    Participant

    @kmw1130

    I’m using the “BuddyPress Group Extras – Extend Your Groups plugin”.

    When I click manage in my group admin/edit-details. The submenu has Details, Settings, Photo, Members, Cover Photo, Forum, Extras, and Delete. If I click Extras it takes me to Group Extras > General Settings, this is also where I can add Pages. I just want to be able to add two new items (icons) for Blog/News, which I have on my site already and Group Info, so when I click either of these two, I would be like the others I have (Activity, Events, Members).

Viewing 14 replies - 1 through 14 (of 14 total)
Skip to toolbar