If there is no excerpt, or if it is a page, wordpress of course defaults to using an extract of “the_content”, which is unfortunately in this case filtered into by AddThis, which echo’s itself into the metatag and breaks things (i.e. content=”<script … “).
In addthis_social_widget.php, this; add_filter('the_title', 'at_title_check');
will call this; add_filter('the_content', 'addthis_script_to_content');
which will call <b>addthis_output_script()</b>, which actually echo’s the script there and then, rather than appending it or returning it.
commenting either of those filters will fix the problem, but we’d prefer a fix from the authors.
Thanks! Could you upgrade to the latest plugin version? The title filter was removed in our release a month or so ago, probably not long after you posted initially. I think that should be fine for now. Sorry for not realizing that immediately!
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘[Plugin: AddThis] Bug! inserting into metatag content via get_the_excerpt/the_content’ is closed to new replies.