Title: Rate custom post types
Last modified: August 22, 2016

---

# Rate custom post types

 *  Resolved [almer1984](https://wordpress.org/support/users/almer1984/)
 * (@almer1984)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/rate-custom-post-types/)
 * Hello,
 * I have 3 custom post types: dutch / belgium / germany. All posts in the 3 different
   post types can be rated. Now i want to show the following:
    – Top 5 rated posts
   where custom_post_type is dutch – Top 5 rated posts where custom_post_type is
   belgium – Top 5 rated posts where custom_post_type is germany
 * How can i do this?
 * Kind regards,
    Almer
 * [https://wordpress.org/plugins/wp-postratings/](https://wordpress.org/plugins/wp-postratings/)

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

 *  Plugin Author [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/rate-custom-post-types/#post-5901133)
 * Here is an example:
    To get custom post type dutch (note the post_type) Example:
 *     ```
       <?php
       $dutch_query = new WP_Query( array( 'post_type' => 'dutch', 'meta_key' => 'ratings_average', 'orderby' => 'meta_value_num', 'order' => 'DESC' ) );
       ?>
       <?php if( $dutch_query->have_posts() ) : ?>
           <?php while ( $dutch_query->have_posts() ) : $dutch_query->the_post(); ?>
               <?php the_title(); ?>
           <?php endwhile; ?>
       <?php endif; ?>
       ```
   
 * For further read, checkout [http://codex.wordpress.org/Class_Reference/WP_Query](http://codex.wordpress.org/Class_Reference/WP_Query).
 * The rest you have to figure it out yourself.
 *  Thread Starter [almer1984](https://wordpress.org/support/users/almer1984/)
 * (@almer1984)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/rate-custom-post-types/#post-5901334)
 * Thanks a lot lester!
 *  [johnnymestizo](https://wordpress.org/support/users/johnnymestizo/)
 * (@johnnymestizo)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/rate-custom-post-types/#post-5901433)
 * Wow. This is awesome!

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

The topic ‘Rate custom post types’ is closed to new replies.

 * ![](https://ps.w.org/wp-postratings/assets/icon.svg?rev=978014)
 * [WP-PostRatings](https://wordpress.org/plugins/wp-postratings/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-postratings/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-postratings/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-postratings/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-postratings/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-postratings/reviews/)

## Tags

 * [custom post type](https://wordpress.org/support/topic-tag/custom-post-type/)

 * 3 replies
 * 3 participants
 * Last reply from: [johnnymestizo](https://wordpress.org/support/users/johnnymestizo/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/rate-custom-post-types/#post-5901433)
 * Status: resolved