WordPress.org

Ready to get started?Download WordPress

Forums

WP Social SEO Booster - Knowledge Graph Social Signals SEO
[resolved] What is the PHP Rating function code? (11 posts)

  1. netigate
    Member
    Posted 1 year ago #

    hi,

    i would like to add a headline at the top of the rating stars in the footer. since it is not possible in the plugin, my idea is to place a headline in the code and insert the rating stars manually, but what would be the php function for doing that?

    http://wordpress.org/extend/plugins/wp-social-seo-booster/

  2. Daniel
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    The php function used to display the star ratings is:

    wps_seo_booster_filter_content

    I hope this helps.

  3. netigate
    Member
    Posted 1 year ago #

    unfortunately, it didnt help. in the admin settings i have to choose the placement. since i want to place it manually i deactivated "Enable Ratings on: Post" and put in your code. nothing shows up ;-(

    usually there is an option for placements like "manually" which activates the function to put in the code.

    is there another way of doing it?

  4. 3x7
    Member
    Posted 1 year ago #

    same here, I left "enable rating" checked.

    unchecked "on posts"

    added
    <?php if(function_exists('wps_seo_booster_filter_content')) { wps_seo_booster_filter_content; } ?>

    -nothing shows up.

    Is tehre any argument to add? like "postID" or something?

    Cheers!

  5. Daniel
    Member
    Plugin Author

    Posted 1 year ago #

    I'll work on that later this week and will then provide a shortcode and custom hook options for that.

  6. netigate
    Member
    Posted 1 year ago #

    are you sure that providing a shortcode will help to solve this? i mean, usually shortcode is placed within the pages/posts and not placed in the template files, isnt it? i got 300 posts by now, and the easiest way would be just to insert the function directly into the theme.

  7. 3x7
    Member
    Posted 1 year ago #

    you could still call the "do_shortcode" in the template...

  8. Daniel
    Member
    Plugin Author

    Posted 1 year ago #

    yes the shortcode will be the best way to go. As said by 3x7 you can call do_shortcode() within your template to display the rating stars.

    Within the code for the shortcode, there I won't add any checks if the ratings have been enabled for that specific post and just display the ratings if the shortcode is used.

    These checks are the reason at the moment, why placing the function in to the template doesn't work straight out of the box.

  9. 3x7
    Member
    Posted 1 year ago #

    perfect!

    Just a thought.... maybe you could implement "thumbs up" voting.. and combine it with stars...

    I know this haven't been done before, but since google results only show stars you could do it like:
    1 thumb-up adds one all stars rating... 1 thumb-down adds 1 star rating, or removes one all stars rating from average rating...

    I just believe "thumbs up" is more welcome for voting...
    however it's just an idea, which could be a winwin...

    Cheers!

  10. netigate
    Member
    Posted 1 year ago #

    hi, thanks for your shortcode idea. is there anything new about this or the release date?

  11. Daniel
    Member
    Plugin Author

    Posted 1 year ago #

    Right now I'm working on it and it will be released later this week.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.