I have decided that for all pages where multiple posts are shown (e.g. front, category, tag pages), that post images should not be shown. Instead, featured images, if specified, should be shown next to each post.
Right now, featured images are working fine for posts. However, when multiple posts are displayed (e.g. on the front page, category pages), images should be stripped from the posts.
When a single post is displayed, the images should display as well.
I’m assuming that this has something to do with add_filter()
and a regex str_replace()
on the post, but this would affect the post no matter where it’s displayed.
Reply
Try this
Place in your functions.php file, call up your the_content() like normal. This will allow you to still have a feature image, but remove all images from main page. If you want to remove them from other pages just add to your and ||
–Edit–
You were on the right track with the filter and replace, 🙂 just have to do some digging.
Simple way I do. I set feature images for each post.
Getting the first image match in post and display it – is other way. But maybe difficult. That way is good for lazy post-er 🙂
Hope can help you.