Hide image on blog page

Searched the forum to no avail - Is there a way to hide the image on the main page - i.e., “blog” page? Only show on the blog post page?

Read manuel for Pulse.
Truncating Posts = http://help.pulsecms.com/article/15-blog

1 Like

Thanks, though I don’t believe the “Read More” option will help if the image comes before the text.

Thanks @darskid - can you share an example?

Often people want to show images on the Blog page as “featured” images and then make the readmore link more attractive.

If you just want text you could display a blog list with RSS feed. Show title + some text.

Let us know what you are trying to achieve :slight_smile:

Hi @darskid,

Try this:

  1. Edit your /inc/blog.php

  2. Look for this code (line #120 on v4.7):

     $content_blog   = implode("\n", $lines);
  3. Add the following code below that line

     $content_blog   = preg_replace("/<img[^>]+\>/i", "", $content_blog);

That will remove any <img ... > before displaying, so your image(s) shall be gone.

Hope this helps.


Displaying and hiding images in a blog = using js

1 Like

Perfect, exactly what I was looking for - thank you!


This topic was automatically closed after 3 hours. New replies are no longer allowed.