Support » Plugins » Is there a way to have a "cover image" for each post?

  • Resolved ransom1337



    I’m setting up a WordPress that will have posts of varying types (i.e. some will be image galleries, others will be a single image, some will just be text-based).

    On the index page where all the latest posts are shown, I’d like each post to have a ‘cover image’ to give the user an idea of the content of the post. This image won’t be used inside the post once the user has clicked on it, only for the front page.

    Does anyone know if there a plugin for this, please?


Viewing 6 replies - 1 through 6 (of 6 total)
  • Oh and of course it’ll need to hide the content of the post so that it’s not shown in the index. Thanks for any help!



    Forum Moderator

    consider using the ‘featured image’

    as this is used independant of ‘the_content()’ simply don’t use the_content() or the_excerpt(); in your index loop;

    Brilliant, thanks for your help alchymyth, I didn’t realise there was a Post Thumbnail feature.

    This has unearthed another question for me. I’m trying to edit my index loop as you suggested, but the “have_posts” loop only contains this:

    <?php get_template_part( 'content', get_post_format() ); ?>

    Isn’t this where the_excerpt(); and the_content() should be? I think it used to be, anyway. Do you know where I might be able to find them now, please?



    Forum Moderator

    just follow the hint to content.php and look for the code there;

    the line is basically including a file content.php or some content-{???}.php

    caveat: that file might also be used for other pages such as archive pages; if you only want your edits to have effect on the front page, you might need to wrap them into conditional statements using some of the conditional tags

    Excellent advice, I now have this all sorted. Thanks!

    Forgot to check as resolved.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Is there a way to have a "cover image" for each post?’ is closed to new replies.