- This topic has 9 replies, 2 voices, and was last updated 3 years, 3 months ago by Leo.
February 13, 2018 at 8:33 am #495371Weatherly
Does anyone know how to kill the content image and caption from the excerpt, perhaps something some code for the child theme functions?
A little context:
We have imported this site from Joomla. And we WANT featured images because many articles (now posts) had none. But others have content images, the same ones as featured, and right in the excerpt.
I tried this: Easy Custom Auto Excerpt plugin By tonjoo to get rid of the few content images, but sadly, it still left a giant caption in the way, as well as interfering with Generatepress Read More buttons.
So I’m back to thinking we need something in the functions but am not enough a PHP expert to know what exactly it would need. Any suggestions?GeneratePress 2.0.2GP Premium 1.5.6February 13, 2018 at 10:55 am #495518LeoStaffCustomer Support
I’m not 100% clear on the question but WordPress strips all HTML in excerpt by default so your content images and styles in your posts shouldn’t show in excerpt.
If it’s showing then likely because you are using the more tag which includes everything: https://docs.generatepress.com/article/using-the-more-tag/
Let me know if this helps.February 13, 2018 at 11:30 am #495541Weatherly
🙁 It is likely that tag is in there on some. Is there no way to work around it? As I said its a very big site with lots of old articles from before the import. It would be too much to get rid of them all manually. I did try and manually comment it out and it didn’t seem to help in any case.February 13, 2018 at 2:17 pm #495655LeoStaffCustomer SupportFebruary 14, 2018 at 6:41 am #496115Weatherly
ok is there somewhere I can send the link? I don’t want to publicly link to the dev site.February 14, 2018 at 6:43 am #496117LeoStaffCustomer SupportFebruary 14, 2018 at 7:56 am #496276Weatherly
here is the path to the page (its a bit weird still) 2017/03/23/the-original-medicinal-plant-gatherers-conservationists/
here is the category (its at the top)
there are more but that is the most obvious oneFebruary 14, 2018 at 11:21 am #496491LeoStaffCustomer SupportFebruary 14, 2018 at 12:56 pm #496580Weatherly
unfortunately that removes it from the post too. we only wanted gone from the category page excerpt. 🙁February 14, 2018 at 1:07 pm #496602
- You must be logged in to reply to this topic.