Hey guys, I've been stuck with this issue for a wile and need some help. So I've made a basic wordpress plugin which creates a short tag "[review id=1]" This short tag would then query a mysql database and display the info for the review with $id 1 which works fine. The problem is, part of the review calls on another plugin, http://wordpress.org/extend/plugins/...review-rating/ to display the rating as in stars by displaying "[Rating:4/5]" However, rather than displaying the picture, "[Rating:4/5]" is written down whereas normally I'd get 4 stars. Is there anyway I can fix that? What I have so far is on: http://pastebin.com/FWB3qbcP Cheers
Hi there, just a quick thought: perhaps the rating plugin is called before your plugin, therefore the [rating] shortcode isnt getting parsed? check the priority of both your plugin and the ratings one. hope this helps!
In the php file for the ratings plugin, look for where it adds the action or filter. the priority can be set here for example: add_filter( 'hook_name', 'callback_name', 100 ); where 100 is the plugin priority on a scale of 0 - n, 0 being the highest priority and 10 being the default. There is also a way of ensuring your plugin loads first, here's a link that explains it much better http://wordpress.org/support/topic/how-to-change-plugins-load-order
Hi, did you change the priority of your plugin to be before the rating plugin? I think yours should be called after the rating plugin, then you will have access to the function which is called by the shortcode. Another idea would be to call the rating function directly from your code, and wrap it with " if (function_exists('name_of_rating_func')) ". This way you avoid using the shortcode altogether.