• Resolved kwavewd

    (@kwavewd)


    So The rating stars are showing perfectly on the website profile pages and working fine. But I want to show them below a users featured member on the homepage. I am using a featured members widget plugin. I added

    reviews” title=”<?php bp_member_name(); ?>”>
    <?php do_action( ‘bp_profile_header_meta’ ); ?>
    to my template file

    Which made the ratings stars show up but they are not correct. They are just fully lit for all 5 stars. There should be 4 stars for one customer and 0 stars for the other as this site is it testing.

    How can I simply add a shortcode or something like
    <?php echo do_shortcode( ‘[rating-stars]’); ?> to show the rating in different places.

    please help me thank you.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author wordplus

    (@wordplus)

    Hi there!

    You can try this:

    global $BP_Member_Reviews;
    $BP_Member_Reviews->embed_rating( $user_id );

    Thanks!

    Thread Starter kwavewd

    (@kwavewd)

    thank you so I tried that but it still just shows them ranked at 5 stars not correct. Is there another piece of code I have to insert ?

    thank you so much

    Plugin Author wordplus

    (@wordplus)

    No this code should work. Check if passing right $user_id everywhere.

    Thread Starter kwavewd

    (@kwavewd)

    this is the code from file i am inserting this into
    <?php
    /**
    * Members list template
    */
    $view = bp_featured_members()->get(‘view’);
    ?>
    <?php if ( bp_has_members( bp_ajax_querystring( ‘members’ ) . ‘&scope=featured’) ) : ?>
    <ul class=”item-list featured-members-list featured-members-<?php echo $view; ?>” >
    <?php while ( bp_members() ) : bp_the_member(); ?>
    <li class=”featured-member-item “>
    <div class=”item-avatar”>
    ” title=”<?php bp_member_name(); ?>”>
    <?php bp_member_avatar(); ?>

    </div>
    <div class=”item”>
    <div class=”item-title”>
    ” title=”<?php bp_member_name(); ?>”>
    <?php bp_member_name(); ?>
    <br />
    <?php
    bp_member_profile_data( ‘field=Address’ );
    ?> <br />

    reviews” title=”<?php bp_member_name(); ?>”>

    <?php global $BP_Member_Reviews;
    $BP_Member_Reviews->embed_rating( $user_id );
    ?>

    </div>
    <div class=”item-meta”>
    <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>
    </div>

    <?php endwhile; ?>

    <?php else: ?>

    <div id=”message” class=”info”>
    <p><?php _e( ‘Sorry, no members were found.’, ‘bp-featured-members’ ); ?></p>
    </div>

    <?php endif; ?>

    Thread Starter kwavewd

    (@kwavewd)

    sorry `<?php
    /**
    * Members list template
    */
    $view = bp_featured_members()->get(‘view’);
    ?>
    <?php if ( bp_has_members( bp_ajax_querystring( ‘members’ ) . ‘&scope=featured’) ) : ?>
    <ul class=”item-list featured-members-list featured-members-<?php echo $view; ?>” >
    <?php while ( bp_members() ) : bp_the_member(); ?>
    <li class=”featured-member-item “>
    <div class=”item-avatar”>
    <a href=”<?php bp_member_permalink() ?>” title=”<?php bp_member_name(); ?>”>
    <?php bp_member_avatar(); ?>
    </a>
    </div>
    <div class=”item”>
    <div class=”item-title”>
    <a href=”<?php bp_member_permalink(); ?>” title=”<?php bp_member_name(); ?>”>
    <?php bp_member_name(); ?>
    </a><br />
    <?php
    bp_member_profile_data( ‘field=Address’ );
    ?> <br />

    <a href=”<?php bp_member_permalink(); ?>reviews” title=”<?php bp_member_name(); ?>”>

    <?php global $BP_Member_Reviews;
    $BP_Member_Reviews->embed_rating( $user_id );
    ?>
    </a>

    </div>
    <div class=”item-meta”>
    <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>
    </div>
    </li>
    <?php endwhile; ?>
    </ul>

    <?php else: ?>

    <div id=”message” class=”info”>
    <p><?php _e( ‘Sorry, no members were found.’, ‘bp-featured-members’ ); ?></p>
    </div>

    <?php endif; ?>`

    Plugin Author wordplus

    (@wordplus)

    oh man.

    try to use bp_get_member_user_id() instead of $user_id

    • This reply was modified 7 years, 2 months ago by wordplus.
    Thread Starter kwavewd

    (@kwavewd)

    YES!!!!!!!! It Worked it worked your the BOMB!

    Thread Starter kwavewd

    (@kwavewd)

    RESOLVED

    Thread Starter kwavewd

    (@kwavewd)

    I could use a little more help with this site would you be interested I can pay you?

    what’s your email?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Adding The Rating Stars to Homepage Under Featured Member’ is closed to new replies.