[Plugin: All in One Adsense and YPN] AIO Adsense and Headspace 2 error when using %%excerpt%%
-
Okay this took me an ungodly amount of time to debug. I hope it can help some of you. Adsense fails to load when running Headspace 2 using the %%excerpt%% tag.
The bug lies here:
headspace2/models/inline_tags.php
Line #207
$excerpt = apply_filters (‘the_content’, substr ($post->post_content, 0, 1000));Changed it to:
$excerpt = substr ($post->post_content, 0, 1000);I don’t know the benefits of using apply_filters but the above code will result in AIO working and headspace2 still creating the necessary meta description tag.
I see apply_filters used quite a bit so why it errors out here is beyond me. Reading up on apply_filters I guess it’s supposed to run the filter after all hooks have completed.
However, AIO was receiving null from ‘the_content’ hook thus substr would not work for the adsense ads. Whew!
- The topic ‘[Plugin: All in One Adsense and YPN] AIO Adsense and Headspace 2 error when using %%excerpt%%’ is closed to new replies.