
Many users of  run into the famous excerpt problem when setting plugin to work with some themes and when posts didn’t had excerpt pre-set. And solution was there, but it wasn’t very elegant. And now looks like that this problem will be gone for good.
Excerpt problem is caused by WordPress itself. If your theme uses the_excerpt() function, and you have no excerpt saved with the post, WordPress will try to create the excerpt using main post content. And during that process the_content() function is called and that triggers GD Star Rating auto insertion. And depending on your settings, this could cause some strange elements appearing in the text.
Previous solutions can be found here: Â Excerpt Problem. But know I have found the way to solve this internally and to prevent GD Star Rating auto insertion if the call originated from excerpt functions. I am using PHP function debug_backtrace() to get all functions executed leading to GD Star Rating insertion call. If this log contains excerpt call, than rendering is skipped, and GD Star Rating will not inject unneeded code into the result.
And this will be available on in 2-3 days in GD Star Rating 1.7.4.
loading...




Comment Link
I have not updated yet because I believe this will destroy the way I am using the auto Excerpt function to put the stars on the excerpt pages.
I use a plugin called HTML Excerpt to translate the way WordPress treated the Excerpt and the rating stars displayed fine in all my Excerpts.
If I understand this correctly if I upgrade the stars will no longer display on the Excerpt pages?
loading...