1. ivancamilov
    Posted 4 years ago #

    Hi... a quick improvement you can make to your plugin is to make sure that Custom Post Types can be included in the counts as well.

    You can do this pretty quickly in the most_shared_posts_update_social_data function, by adding the post_type => any argument to your query, like this:

    $args = array(
    'posts_per_page' => 500,
    'orderby' => 'date',
    'order' => 'DESC',
    'ignore_sticky_posts' => 1,
    'post_type' => 'any'



  2. Jenny Beaumont
    Posted 4 years ago #

    Hi ivancamilov,

    I'm just looking into this plugin for use on a site and am curious about your post. Can you give me an example of a case where a custom post type would be shared on a social media site?


  3. ivancamilov
    Posted 4 years ago #

    Hi Jenny

    Custom post types are pretty useful in a lot of ways; perhaps you have a site about lifestyle where recipes are part of it, and you would like to handle "Food" and "Drink" as custom post types, so you could have additional custom fields or taxonomies applied to them.

    In that case, you'd definitely want to share your recipes on social sites to get more traffic to your site. As a matter of fact, by using stuff like Facebook's Open Graph you could have your users share stuff like "Camilo prepared a Vodka Martini on jennysplace.com" on your user's timeline.


  4. Jenny Beaumont
    Posted 4 years ago #

    So you're talking about sharing a "page" of posts, defined by category or other post type? Cool indeed...and I see then why that would be tricky to list as "most shared". Interesting food for thought, cheers!

  5. danmont
    Posted 3 years ago #

    Hi ivancamilov,

    My theme uses custom post types so I definitely need to add the argument code you mentioned for it to work on my site. Im a bit new to coding so wold you let me know what file or where to ad the argument to?

    Thank you!

    anyone's input would be much appreciated!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Most Shared Posts - Social Media counter for Twitter, Facebook & Google+
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic