Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • rajveersingh007
    Participant

    @rajveersingh007

    Have you install the plugin (BuddyPress Cover Photo)?


    rajveersingh007
    Participant

    @rajveersingh007

    <?php while ( bp_members() ) : bp_the_member(); ?>

    <?php
    $user_id = bp_get_member_user_id();
    $jin=bp_get_member_user_email();

    $member_email = $jin;
    // $swpm_user = SwpmMemberUtils::get_user_by_email($member_email);

    //echo $resulty->membership_level;
    // echo $display_vars[‘membership_level’];
    //print_r($resulty);

    /* $member_id = ‘2’;
    $field_name = ‘membership_level’;
    echo $level_id_value = SwpmMemberUtils::get_member_field_by_id($member_id, $field_name);
    */

    $user = new WP_User( $user_id );

    if ( $user->roles[0] == ‘author’ ) { ?>
    <li <?php bp_member_class(); ?>>
    <div class=”item-avatar”>
    “><?php bp_member_avatar(); ?>
    </div>

    <div class=”item”>

    <div class=”item-title” style=”display:inline;”>
    “><?php bp_member_name(); ?>

    <?php if ( bp_get_member_latest_update() ) : ?>

    <span class=”update”> <?php bp_member_latest_update(); ?></span>

    <?php endif; ?>

    </div>
    </br>

    <div class=”item-meta” style=”display:inline;”><span class=”activity” data-livestamp=”<?php bp_core_iso8601_date( bp_get_member_last_active( array( ‘relative’ => false ) ) ); ?>”><?php bp_member_last_active(); ?></span></div>

    <?php

    $query = $wpdb->prepare(“SELECT * FROM {$wpdb->prefix}swpm_members_tbl WHERE email= %s”, $jin);
    $resulty = $wpdb->get_row($query);

    $mymembership=$resulty->membership_level;
    if ($mymembership==”5″){
    echo “<span style=’background-color:goldenrod;padding:5px 12px;float:right;margin-top:-9px;margin-right: 200px;’>Premium</span>”;
    }

    i need a code so that i can have sorting in a manner that premium should be displayed at the top , then featured members and then free members.i have used two plugin simple membership plugin and buddypress.
    Help in code, that will be a great help .

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