WordPress.org

Ready to get started?Download WordPress

Forums

Thumbs Rating
Feature request: most rating (11 posts)

  1. togur
    Member
    Posted 11 months ago #

    Are you planning displaying most rating posts feature?
    Widget / shortcode?

    http://wordpress.org/plugins/thumbs-rating/

  2. Ricard Torres
    Member
    Plugin Author

    Posted 11 months ago #

    Wasn't planning on that but it's a great idea.

    I don't like plugins add useless widgets to the admin so I think that the shortcode seems the best way to go.

    How would the shortcode work? How should we order the posts? A simple order by most positive votes ASC?

  3. togur
    Member
    Posted 11 months ago #

    The shortcode sounds ok. If would be great to have possibility using php tag as well (for inserting into template).
    It would display list of posts: title + number of voting in brackets. (default 5 posts)
    Ordering by most positive votes by number of votes.
    Optional parameters:
    - number posts to display in list
    - category (display most positive votes from one category)

  4. Ricard Torres
    Member
    Plugin Author

    Posted 11 months ago #

    Gotcha!

    Is there a page in the Codex for that "php tag"? I'm not familiar with it (at least I think I'm not).

    Maybe it's simply like this:

    <?= do_shortcode('[thumbs-rating-top]'); ?>

    I like the parameters you posted:

    • Number of post (default = 5)
    • Category ID

    What about the output? Could we someone be able to set what do we want to print with shortcode parameters?

    I mean, you might want to print any of the following:

    1. Post Title
    2. Post Title +25
    3. Post Title +24 -15

    What about setting these 3 different output being 1 the default so you could choose?

  5. togur
    Member
    Posted 11 months ago #

    > Is there a page in the Codex for that "php tag"?...

    Take a look at
    http://codex.wordpress.org/Function_Reference/do_shortcode
    (Unfortunately I am a newbie in PHP & WP programming so I can't be more helpful.)

    > What about the output?...
    Sorry, I don't understand an example. What does means:
    "Post Title +24 -15"

  6. Ricard Torres
    Member
    Plugin Author

    Posted 11 months ago #

    Alright togur, I already knew about do_shortcode :)

    About the output I meant what should the plugin print. Don't worry I'll figure something out :)

    cheers.

  7. Ricard Torres
    Member
    Plugin Author

    Posted 10 months ago #

    The 1.5 version is out!

    It has a shortcode to show the most voted posts.

    Let me know if you find any problem with it.

    Cheers.

  8. togur
    Member
    Posted 10 months ago #

    Excellent! I have tested it on WP 3.6 - without problem. Thanks.

  9. Blagochevsky
    Member
    Posted 10 months ago #

    Can i use this shortcode in widgets? So that top rated posts would be on side panel.

  10. Ricard Torres
    Member
    Plugin Author

    Posted 10 months ago #

    Hi Blagochevsky,

    Yes, absolutely! :)

    Paste the shortcode in a Text Widget.

    If it doesn't work, you'll need to allow shortcodes in your text widgets.

    It's very simple: http://php.quicoto.com/how-to-allow-shortcodes-to-wordpress-comments/

    Cheers.

  11. Blagochevsky
    Member
    Posted 10 months ago #

    Great! Thanks

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.