Hello,
I have a site with Toolset and have created a specific postype "Oeuvre"
I want to offer the users the ability to rate the different "Oeuvers". For this, I'm using the WP-PostRatings plugin.
In my "Oeuvre" postype template, I have inserted a shortcode that allows to rate. This working fine.
Now, I need to create a specific page in which I will display the most rated "Oeuvre"
I the plugin documentation, they indicate that I can use this code :
<?php if (function_exists('get_lowest_rated')): ?>
<ul>
<?php get_lowest_rated(); ?>
</ul>
<?php endif; ?>
How can I use this function to manage a Views of my postype "Oeuvre" ?
Regards
Pat
Hi, can you tell me a bit more? I would like to know more about how you would like to manage a View with this function. Are you saying you would like to display a View of Oeuvre posts, sorted by rating? Or are you saying you would like to insert this function inside a View of Ouevre posts somehow?
If you would like to sort a View of Oeuvre posts by rating from this plugin, I would need to know more technical information about how the rating is stored for each post. If the rating is stored in a postmeta value for each post, I may be able to show you how to access that value for sorting.
If you would like to insert this function inside a View of Oeuvre posts, then you must create a custom shortcode that calls this function and returns the correct results. Then place the custom shortcode inside the View, either inside or outside the loop depending on how many times you want to display the results.
Hi Christian,
Thanks for your quick answer.
In fact, the rating is stored as a custom field in the postmeta table and I can have the ability to use this custom field as a Toolset Views sorting parameter (this custom field appears in the list proposed by Toolset).
So, my issue is solved now. Sorry to have bother you before having had a deeper look at all the possibilities !!!
Regards
Pat