p.s. this is regarding the plugin Advanced Excerpt
Oddly, it also inserts an
after the img’s alt text. For now, I’m going to let the plugin keep img tags, but display:none in my css…
Sorry, it inserts a break tag… <br />
I’m sorry. I would delete the posts above if I could. It’s not the img alt tag at all. It’s the new p.wp-caption-text that wordpress adds on an image from the media library.
Unfortunately, I can allow paragraphs and hide this css, but the character count will still include these. I would just delete the captions, but I’m developing sites for other people who would never remember to do that…
So, if I understand correctly, WP inserts more than just an img tag when adding an image to the post?
If that is so, then this problem is beyond the scope of this plugin. Of course I could add more functionality to the plugin which would allow you to exclude specific pieces of HTML based on a CSS(-like) selector. But considering the small number of users who will actually benefit from this (and the amount of time it could cost me), I am not putting this on the todo-list (yet).
However, anybody who wants to implement this is free to do so (GPL). 🙂
the caption appears in
<p class=”wp-caption-text”>some text after an image</p>
It wouldn-t be bad to add a custom filter addition field, maybe, if that’s possible.
Anyway – cool plugin! Thank you!!
I also need this option as it is definitely breaking my pages and looks terrible.
Anyway of helping us out?
Add this to your CSS:
.excerpt .wp-caption-text {
display: none;
}
This will hide all elements with class=”wp-caption-text” that are inside an element with class=”excerpt” (you will have to add that wrapper manually to your template, I guess, unless there already is a wrapper of some sort).