Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End How to achieve two different excerpt layouts on one WordPress site? Re: How to achieve two different excerpt layouts on one WordPress site?

#137405
croydon86
Participant

@chrisburton the Advanced Excerpt plugin allows you to bring in all HTML content into the excerpt, as opposed to just text. This works perfectly for what I want on the blog page.

I agree though would love things like this to be a default feature of WordPress

> Anyway, I don’t see why you couldn’t grab the image or video from the latest post.

Yes, but how?


@AlenAbdula
yes this may be a good option actually. I will try this out. It will just mean the user will have to seperate the main image/video from the flow of the post, which shouldn’t be a problem. It can just go into a seperate field.

UPDATE

I have just found with the plugin I am using you can use the_advanced_excerpt which allows you to create custom excerpts whenever you need, which is IDEAL, so if you just want the image, only allow the IMG tag in your excerpt.

Problem with this… WordpPress wraps all images with P tags!!!!

I have tried this solution but it doesn’t seem to work in my particular case…

https://css-tricks.com/snippets/wordpress/remove-paragraph-tags-from-around-images/