• Resolved Marat

    (@s1eng)


    How to order posts by WP Product Review rating?
    And how to get rating value inside my templates php file?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor contactashish13

    (@rozroz)

    @s1eng I’m not sure I am clear about what you want to do. Can you please explain the entire scenario?

    Thread Starter Marat

    (@s1eng)

    I mean, how to sort posts inside category by rating value?
    Look, by default all post sorted by adding datetime, I need change this and add sorting by WP Product Rating value.

    And second question: how to get rating value by php function, in FAQ you write about construction like this:
    do_shortcode(“[P_REVIEW post_id=”. get_the_ID() .” visual=’no’]”)
    Maybe you have more clear function? Because this code return to much json data. And I have to use the function intval.

    Plugin Contributor contactashish13

    (@rozroz)

    @s1eng Currently, there is no direct method to sort the reviews. You will have to use the filter wppr_rating to first save the rating against the post and then use that value in your query.

    for your second question as well you can use the above filter.

    Are you aware of how to use filters in WP? If not, that is something we won’t be able to help you with.

    Thread Starter Marat

    (@s1eng)

    Can you send me examples of code for ordering posts?

    Plugin Contributor contactashish13

    (@rozroz)

    @s1eng please respond to the questions below:

    • have you been able to use the filter I mentioned above? if not, could you let me know what the problem was?
    • what is your proficiency in code? Are you looking to copy/paste the code we provide or will you be able to adjust it if we give you just a barebones snippet?
    Thread Starter Marat

    (@s1eng)

    Unfortunately I did not understand the code.
    But if you send me a code for functions.php, I can integrate it.

    Or if I pay for pro version, your technician masters can add this filter and display rating in categories via my ftp access?

    Plugin Contributor contactashish13

    (@rozroz)

    @s1eng I’m sorry but we wouldn’t be able to help you with custom code although we are always willing to guide our users on how to use and extend the plugin conceptually.

    On pro, we are going to add this feature as part of our next release. So, keep an eye out for it 🙂 The pro version also has a comparison table for the front-end that uses this ordering capability by default, so you may want to check that out as well.

    Plugin Contributor contactashish13

    (@rozroz)

    Closing this.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to order posts by WP Product Review rating’ is closed to new replies.