There isn’t currently a widget, but in the future I might consider creating one.
It is possible for developers to extend this plugin and utilize the data collected if anyone else wants to write a widget and contribute, the plugin is open source!
Can you please write a simple code for a 5 top shared posts widget? please…. 🙂
I am sure that it will increase a lot the use of your plugin since it is something people use, and of course it will help me and I will be really thankful!
Can you tell me how do I make this code a “shortcode”? In order to display on a text widget..
And how do I limit that to 5 posts only?
// Do a meta query
$args = array(
'order' => 'DESC',
'orderby' => 'meta_value_num',
'meta_key' => 'socialcount_TOTAL',
'post_status' => 'publish',
'post_type' => 'post'
);
$wp_query = new WP_Query( $args );
// The Loop
if ($wp_query->have_posts()) : while ($wp_query->have_posts()) :
$wp_query->the_post();
// DISPLAY POST HERE
endwhile;
endif;
Status API Training Shop Blog About
Thank you!
Is it possible to display exactly as it shows on the backend?
Just with a shortcode or a pre-ready widget?
I think it will be really popular and obvious to have.
Maybe I would just omit the comments part for the widget, since it is less a priority and less common to see many results as shares and views..