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?
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
Hi @darskid,
Try this:
-
Edit your
/inc/blog.php
-
Look for this code (line #120 on v4.7):
$content_blog = implode("\n", $lines);
-
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.
Judhi
Perfect, exactly what I was looking for - thank you!
This topic was automatically closed after 3 hours. New replies are no longer allowed.