Skip Navigation

[Resolved] Ref : Implement star rating for posts, Get average rating and add filter

This support ticket is created 7 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 replies, has 2 voices.

Last updated by marcB-6 6 years, 12 months ago.

Assisted by: Minesh.

Author
Posts
#595514
Screenshot_1.png

With reference to ticket : https://toolset.com/forums/topic/implement-star-rating-for-posts-get-average-rating-and-add-filter-for-ratings/

I have added field using below code

add_post_meta($post_ID, 'wpcf-ratings-average', 0, true);
update_post_meta($post_id, 'wpcf-ratings-average', $post_ratings_average);

Now, How to add filter for star rating?

Thanks

#595518

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - you should check with the following reply, how you can build star rating filer:
=> https://toolset.com/forums/topic/searching-book-review-child-cpt-and-book-parent-cpt-by-star-ratings/#post-406289

#595523

The link you suggested above is to create rating system manually..but you see in our last ticket you have suggested to create a toolset number field. So I have added field using add meta and I am asking you that how to add filter using that field.

I have added meta using wpcf- prefix in plugin file.

#595524

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I understand that but you can not enter filter using star images etc..etc..

You can enter normal filter either by dropdown with values or as radio buttons with values. To style the filter with star images you need to follow the link I shared with you.

I hope I make things clear here.

#596737

Thanks