Title: query most shared posts
Last modified: August 30, 2016

---

# query most shared posts

 *  Resolved [taadike](https://wordpress.org/support/users/taadike/)
 * (@taadike)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/query-most-shared-posts/)
 * Is there any way I could filter my blog posts by social score? I have a blog 
   where I would like to display only the posts that have been shared at least 5
   times, for example.
    So if I wanted to query posts, how is the social score saved
   in the database?
 * Thanks
 * [https://wordpress.org/plugins/social-metrics-tracker/](https://wordpress.org/plugins/social-metrics-tracker/)

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

 *  Thread Starter [taadike](https://wordpress.org/support/users/taadike/)
 * (@taadike)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/query-most-shared-posts/#post-6620178)
 * Never mind, I think I got it 🙂
 * Thanks for this incredible plugin!
 *  Plugin Author [Ben Cole](https://wordpress.org/support/users/bcole808/)
 * (@bcole808)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/query-most-shared-posts/#post-6620179)
 * Hello,
 * Yes you can write custom queries that use the plugin data. All data is stored
   as custom meta fields on each post, so you can use a WP Meta Query to query based
   on the data.
 * You can see a list of the available meta fields on the Github readme page here:
   [https://github.com/chapmanu/wp-social-metrics-tracker](https://github.com/chapmanu/wp-social-metrics-tracker)
 * So for example, a meta query to show posts with more than 5 shares might look
   like this:
 *     ```
       $args = array(
       	'post_type'  => 'post',
       	'meta_key'   => 'socialcount_total',
       	'orderby'    => 'meta_value_num',
       	'order'      => 'DESC',
       	'meta_query' => array(
       		array(
       			'key'     => 'socialcount_total',
       			'value'   => 5,
       			'compare' => '>',
       		),
       	),
       );
       $query = new WP_Query( $args );
       ```
   
 * Edit: Looks like we posted at exactly the same time. Hope this info is helpful
   though in case anyone finds this in the future!
 *  Thread Starter [taadike](https://wordpress.org/support/users/taadike/)
 * (@taadike)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/query-most-shared-posts/#post-6620180)
 * Cool, thanks! That helps.
    Just one question – if a post is “liked” is it equal
   to a “share”? both raise the total count by equal value?
 *  Plugin Author [Ben Cole](https://wordpress.org/support/users/bcole808/)
 * (@bcole808)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/query-most-shared-posts/#post-6620181)
 * I do believe that on Facebook they count all of these, and they all raise the
   total count by one:
    - Sharing a URL (by copy/pasting the URL onto a timeline or by clicking a “Share”
      button)
    - Clicking “Like” on that URL that has been shared
    - Posting a comment on the URL that has been shared

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

The topic ‘query most shared posts’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/social-metrics-tracker_99a19a.svg)
 * [Social Metrics Tracker](https://wordpress.org/plugins/social-metrics-tracker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/social-metrics-tracker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/social-metrics-tracker/)
 * [Active Topics](https://wordpress.org/support/plugin/social-metrics-tracker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/social-metrics-tracker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/social-metrics-tracker/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Ben Cole](https://wordpress.org/support/users/bcole808/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/query-most-shared-posts/#post-6620181)
 * Status: resolved