WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Top Recommended Post Shortcode

[Resolved] Top Recommended Post Shortcode

  • Redsand747
    Member

    @redsand747

    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/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Harish Chouhan
    Participant

    @hchouhan

    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?

    Redsand747
    Member

    @redsand747

    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

    Plugin Author Harish Chouhan
    Participant

    @hchouhan

    @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.

    Redsand747
    Member

    @redsand747

    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

    Plugin Author Harish Chouhan
    Participant

    @hchouhan

    @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

    Redsand747
    Member

    @redsand747

    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

    Plugin Author Harish Chouhan
    Participant

    @hchouhan

    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.

    Redsand747
    Member

    @redsand747

    Ok, almost exactly what I needed 🙂

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] Top Recommended Post Shortcode’ is closed to new replies.