WordPress.org

Forums

I Recommend This
[resolved] Top Recommended Post Shortcode (9 posts)

  1. Redsand747
    Member
    Posted 11 months ago #

    Hey there,

    I'm attempting to use your shortcode to display top recommended posts:

    [dot_recommended_posts container='div' post_type='showcase' number='10' year='2013' monthnum='7']

    I've modified it to try and display recommended posts from this month as follows:

    [dot_recommended_posts container='div' post_type='showcase' number='10' year='2014' monthnum='5']

    Here is the page I'm testing it on:

    http://takelessons.com/blog/test-page-test-page

    Unfortunately, it doesn't look like the code is outputting anything...

    Any help would be appreciated.

    Thanks!

    https://wordpress.org/plugins/i-recommend-this/

  2. Harish Chouhan
    Member
    Plugin Author

    Posted 11 months ago #

    Hello @Redsand747,

    the shortcode seems correct. I visited your page but did not see any content.

    Secondly is the top 10 content you wish to pull belong to "Showcase" post type or is it general blog posts?

  3. Redsand747
    Member
    Posted 11 months ago #

    Hey Harish,

    The top 10 content is a general blog post... didn't think that was a variable I could change. Can it show top 10 general blog posts?

    Thanks for your reply!

    All the best,
    Jon

  4. Harish Chouhan
    Member
    Plugin Author

    Posted 11 months ago #

    @Redsand747

    I meant the code you shared. If you placed that, it would definitely not work. In the shortcode, there is an option post_type='post' to choose the kind of custom post type you wish to query. For standard post this needs to be set to post. Below is one example.

    [dot_recommended_posts post_type='post' container='div' number='10' year='2014' monthnum='5']

    Try adding the above to your post and let me know.

  5. Redsand747
    Member
    Posted 11 months ago #

    Perfect!! Works like a charm.

    If I want to display posts from anytime in 2014 would I update the short code as follows?

    [dot_recommended_posts container='div' post_type='showcase' number='10' year='2014']

    Just removing the "monthnum" from the short code.

    Thanks!
    Jon

  6. Harish Chouhan
    Member
    Plugin Author

    Posted 11 months ago #

    @Jon, I have not tried that but yes it should work. On one of my websites FlatTrendz.comyou will see top 10 posts from all time, and if you visit the blog, there are monthly blog post to showcase that months top 10 gallery items.

    P.S. in the code you placed above, you again added showcase instead of post. Please make sure you don't do this on your website.

    Would love to get your review on this theme Review

  7. Redsand747
    Member
    Posted 11 months ago #

    Hey Harish,

    I'll be happy to leave a review, thanks for asking. Here's the updated page:

    http://takelessons.com/blog/test-page-test-page

    Unfortunately it's showing a lot of posts that aren't using I Recommend This.

    Is it possible to limit the posts by post category OR simply to eliminate any post that has "0" recommendations?

    Thanks!
    Jon

  8. Harish Chouhan
    Member
    Plugin Author

    Posted 11 months ago #

    Hi Jon,

    Yes I did notice that on your page. You're only option is to limit the number of posts that are displayed. There is no way to eliminate the post with "0" likes.

    The category feature is something I am working on. It makes the plugin bit slow but I'm working on it. Once I test it on my own sites later next month, I'll release an update.

  9. Redsand747
    Member
    Posted 11 months ago #

    Ok, almost exactly what I needed :)

    Will be a great update for your plugin. Thanks again for all the help.

Reply

You must log in to post.

About this Plugin

  • I Recommend This
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.