This also happens on my site and I thought it may have to do with my img tag being inside of an anchor tag (which I had set that anchor tags were not to be stripped). Do you have the plugin set to strip out the div tag?
Maybe it is a problem with nested tags. Just a thought.
Hi @taxman10m,
Thanks for the additional feedback. I tried that and allowed Divs and I am still getting the same results. I even tried allowing all tags except for images and same thing.
It seems that everything goes haywire once the “src” is stripped out but the main problem is the tag is not being stripped which leads the content:
Here is the source at the opening of the post:
<p>
<img class="aligncenter size-full wp-image-7022" src="http://www.southwestdiscovered.com/wp-content/uploads/2016/05/Meow-Wolf-Refrigerator.jpg" alt="Meow Wolf Refrigerator" srcset="http://www.southwestdiscovered.com/wp-content/uploads/2016/05/Meow-Wolf-Refrigerator.jpg 500w, http://www.southwestdiscovered.com/wp-content/uploads/2016/05/Meow-Wolf-Refrigerator-300x300.jpg 300w, http://www.southwestdiscovered.com/wp-content/uploads/2016/05/Meow-Wolf-Refrigerator-100x100.jpg 100w, http://www.southwestdiscovered.com/wp-content/uploads/2016/05/Meow-Wolf-Refrigerator-150x150.jpg 150w" sizes="(max-width: 500px) 100vw, 500px" width="500" height="500">
I took a seat in the living room to get a feel for where I was and where to begin, then glanced into the kitchen and saw a group of kids open the refrigerator door and walk on through.
</p>
and here is the result after the stripping in the excerpt:
<img class="aligncenter size-full wp-image-7022" …<="" div="">
Thanks for any additional help.
I figured it out. If your post has a featured image that is what isn’t getting stripped out.
In my theme options there is this setting:
Archives Settings
Display
Excerpt + Featured image
Excerpt + Full width Featured image
Content
2 Columns
This was set to Excerpt + Featured image. If I set it to Content then I no longer have the problem (but it creates a new problem where the theme’s stylish Read More button disappears).
If the plugin could additionally be set to also strip out the featured image I guess that would be the best fix. In my case I think I need to edit the theme and remove the code so it displays only the excerpt and not the featured image.
-
This reply was modified 7 years, 10 months ago by taxman10m.
-
This reply was modified 7 years, 10 months ago by taxman10m.
Thanks @taxman10m,
But my issue is different. I do have featured images set but the client has an image that starts each post which is what is getting partially populated in the excerpt. Primarily, I have a map plugin that pulls the post excerpt in it’s teasers. We had hundreds of posts so didn’t want to set the excerpts manually and that is why I used this plugin.
However, this plugin is still not creating the custom excerpts as expected and leaving the html of the first image partially intact which is blowing out my teasers.
Thanks and I hope the plugin author will weigh in to help get this issue fixed.
-
This reply was modified 7 years, 10 months ago by SweetPweb.