Site logo

Archived topic

Hide content images only in homepage

3 replies · Started by Ramesh Srinivasan on January 27, 2016

Viewing posts 1–4 of 4

For some posts, I start with something like this:

<p><img class="alignright" src="http://www.sampleweb.com/something.jpg" alt="sampleimage" />Content starts....Some paragraph</p>

Is there a way to hide the image in the homepage?

Hi there,

You can set your blog to show the excerpt by going into "Customize > Blog > Blog Content".

By setting the excerpt it will strip the image.

If this doesn't work for you try this CSS:

.blog .entry-content img,
.archive .entry-content img {
     display: none;
}

Adding CSS:https://generatepress.com/knowledgebase/adding-css/

Used the CSS, and works fine. Just what i needed :)

Awesome! Glad it worked :)

This archived topic is closed to new replies.