[Plugin: GD Star Rating] Using with AJAX on a custom post type
-
Hi,
I’m trying to use GD Star Rating in a theme that uses AJAX to display objects from a custom post type.
It’s all set up and the AJAX mostly works fine, but I get a PHP error when I call the wp_gdsr_render_article() function from my loop when I’m using the AJAX.
The error I get is:
Fatal error: Call to a member function render_article() on a non-object in [...]\wp-content\plugins\gd-star-rating\code\fn\legacy.php on line 182
I use exactly the same loop code within the AJAX as I do in a non-AJAX page display, and the stars work fine on the non-AJAX page.
My guess is that something in the plugin is not being initialised when I call it through AJAX.
I’ve tried including wp-load.php to see if that gets the plugin initialised correctly but this doesn’t seem to help either.
Any ideas how to get this working?
Thanks
Ross
- The topic ‘[Plugin: GD Star Rating] Using with AJAX on a custom post type’ is closed to new replies.