WordPress.org

Ready to get started?Download WordPress

Forums

Rating-Widget
Show Rating Outside Of Post (4 posts)

  1. Andy
    Member
    Posted 2 years ago #

    Love this plugin but was wondering how I could display the rating bar outside of my post content?

    Is there a PHP shortcode or function I can implement to put the ratings anywhere I want (I have a feature image section for each post and I want to display it above that...not currently possible with the plugin setup as the image is called outside the content)

    Thanks

    http://wordpress.org/extend/plugins/rating-widget/

  2. thexk
    Member
    Posted 2 years ago #

    I'd like to know how to do that too. I want to display the plugin where I want it to be.

    Please, anyone knows how to do that? Perhaps there's a template tag or something?

    PS: This is a great plugin

  3. meloniq
    Member
    Posted 2 years ago #

    Hi,

    Open "rating-widget.php"
    Remove this line (~2757):

    // Hook post rating showup.
    add_action('the_content', array(&$this, "rw_display_post_rating"));

    In the same place add line:
    add_action('meloniq_post_rating', array(&$this, "rw_display_post_rating"));

    Open "YourTheme/functions.php" and add:

    function meloniq_post_rating() {
    	$content = '';
    	$content = apply_filters('meloniq_post_rating', $content);
    	echo $content;
    }

    Now call function "meloniq_post_rating()" (almost) wherever You wish;)

  4. jeremie74
    Member
    Posted 1 year ago #

    Doesnt work..

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic