Hey there, I specifically tried to get you to test this for me while in RC but didn't hear back. Can you give me an example of a theme that does this? It's just in short auto generated excerpts, right?
This is a problem with almost any plugin that adds script or css via the_content filter. The issue is that wp_trim_excerpt does strip_tags, but it does not remove the content within style and script tags, even though you probably want it too. So on those very rare occasions your post content is shorter than 55 words, it will display the contents of the JS. Many plugins have this issue, and the few that deal with it are forced to in a roundabout way because of WP limitations.
You can try to guess if it's displaying an excerpt by turning off the hook in is_home() or is_archive(), but that is completely theme dependant whether they display excerpts or not in those views. is_home() especially is more often full content.
You can override wp_trim_excerpt completely and remove the_content filter, but that will break any plugins that you do want to still add stuff to excerpts.
Responses (11)
Sales & Support Lead — 30th October 2011 #
Hiya,
I'll ask Aaron to respond to this one. Are you only using the options available within Pro Sites?
Thanks!
Lifetime member! — 30th October 2011 #
yep. This is a network that was waiting for pro sites. Never installed supporter or sup. advertising :)
Lead Developer — 31st October 2011 #
Hey there, I specifically tried to get you to test this for me while in RC but didn't hear back. Can you give me an example of a theme that does this? It's just in short auto generated excerpts, right?
Lead Developer — 31st October 2011 #
This is a problem with almost any plugin that adds script or css via the_content filter. The issue is that wp_trim_excerpt does strip_tags, but it does not remove the content within style and script tags, even though you probably want it too. So on those very rare occasions your post content is shorter than 55 words, it will display the contents of the JS. Many plugins have this issue, and the few that deal with it are forced to in a roundabout way because of WP limitations.
You can try to guess if it's displaying an excerpt by turning off the hook in is_home() or is_archive(), but that is completely theme dependant whether they display excerpts or not in those views. is_home() especially is more often full content.
You can override wp_trim_excerpt completely and remove the_content filter, but that will break any plugins that you do want to still add stuff to excerpts.
Lifetime member! — 31st October 2011 #
That is why I told you long time ago to have a look to ads manager that just works fine, because it does NOT use the content filter.
So many themes are concerned that in fact the ads module can just work with old themes dedicated to blogs and that do not use any excerpt.
smel like facebook, technical speech, even business here have the problem but shuld test all 133 themes and others.
Surprisingly I have absolutly no problem with elegant theme, but it deos not matter since they are given as premium so without ads...
Sorry for the testing thing :( but i was very busy and had a pc breakdown that get me in much troubles :(
But anyway this "excerpt" thing is an old one already discussed many times :) also during the survey period...
I thought you had taken it in consideration before ;)
Lead Developer — 31st October 2011 #
Can you test his updated ads module for me and let me know if you see the issues still?
Lifetime member! — 31st October 2011 #
ok
will test it on several themes. On "smell like facebook' there is no more ads at all.
testing other themes.... and come back :)
mmmm there is a stripslach problem.... in the text area to insert the codes. i have many \\\\\\ now in it :
there should not be the \ automatically inserted
Lead Developer — 31st October 2011 #
It should be skipping adding ads when a excerpt is less than 55 words to prevent showing code.
As for the slashes, see http://premium.wpmudev.org/forums/topic/strip-slash-error-on-pro-sites-levels-network-admin-page
Lifetime member! — 31st October 2011 #
still testing.
need few time :)
For strip slach i donnot have magic quotes installed of course .
Lead Developer — 31st October 2011 #
Ok, i've added both fixes to 3.0.3. Thanks!
Lifetime member! — 1st November 2011 #
mmmm
now working fine :)
no ads on homepage, no ads on category page....
mmmmm
goood !
:)
Become a member