WordPress.org

Ready to get started?Download WordPress

Forums

Disable Featured Image as Header in Twenty Twelve (9 posts)

  1. daverage
    Member
    Posted 1 year ago #

    Hi.

    Is it possible to disable the use of the featured image as the header image for posts in the Twenty Twelve theme - if so, how??

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    edit content.php (best in a child theme http://codex.wordpress.org/Child_Themes ) and remove/edit this line (line 18):

    <?php the_post_thumbnail(); ?>
  3. Gary Allman
    Member
    Posted 1 year ago #

    I had a very similar requirement. So I'll add it here for anyone searching for the above text.

    Unfortunately the above solution worked too well for my needs as it also blocked out the featured image from showing on post summaries.

    My requirement was:

    When a post is summarized I want the featured image to show.

    When a post is displayed in full I don't want the featured image to show.

    Using the following code seemed to do the trick:

    <?php if ( !is_single() ) the_post_thumbnail(); ?>

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    You've got more chance of receiving help if you post your own thread with the issue and if necessary, link to this thread.

  5. Gary Allman
    Member
    Posted 1 year ago #

    Very sorry. I thought it would be appropriate to post an alternate solution here. As The solution I've posted works, I don't require any assistance, so I won't open a separate thread. Thanks for letting me know.

  6. Techno Tim
    Member
    Posted 1 year ago #

    Thank's Gary That helped me, Don't appoligise when you have not done anything wrong :)
    I just commented out <?php the_post_thumbnail();?> under article id in the content.php that solved it simply.
    I wanted to still use the thumbnail for other areas but not on the post pages.....

  7. jkhnels
    Member
    Posted 1 year ago #

    Hey y'all. So with the <?php if ( !is_single() ) the_post_thumbnail(); ?> that Gary provided, should that only go on the content.php document?

    I've created a child theme with just that change, but the thumbnails are still appearing when I 'live preview.' I basically copied the entire theme and made that one change on that document, but left the rest the same. Is there another change I need to make?

    Thanks!
    Jen

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    @jkhnels: As per the Forum Welcome, please post your own topic. Posting in an existing topic prevents us from being able to track issues by topic. Added to which, your problem - despite any similarity in symptoms - is likely to be completely different.

  9. jkhnels
    Member
    Posted 1 year ago #

    @Esmi, I will, just thought I would start here since this is where I found the code I'm trying.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic