Support » Fixing WordPress » Featured Image

  • I added a plugin for related posts, and then realized I wanted to set the featured image for each post. Except this also changes my posts from full posts to summary posts with the featured image. Is there any way to both add a featured image and keep the full web posts? Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • what theme are you working with?

    It’s the Forever theme.

    to keep the full post while showing a featured image, edit this section in content.php:

    <div class="entry-content">
    		<?php if ( '' != get_the_post_thumbnail() ) { ?>
    			<figure class="entry-thumb">
    				<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( forever_get_post_thumbnail_size() ); ?></a>
    			</figure><!-- .gallery-thumb -->
    			<?php the_excerpt(); ?>
    		<?php } else { ?>
    			<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'forever' ) ); ?>
    		<?php } // if ( '' != get_the_post_thumbnail() ) ?>
    		<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'forever' ), 'after' => '</div>' ) ); ?>
    	</div><!-- .entry-content -->

    and change it to:

    <div class="entry-content">
    		<?php if ( '' != get_the_post_thumbnail() ) { ?>
    			<figure class="entry-thumb">
    				<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( forever_get_post_thumbnail_size() ); ?></a>
    			</figure><!-- .gallery-thumb -->
    		<?php }
    			the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'forever' ) ); ?>
    
    		<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'forever' ), 'after' => '</div>' ) ); ?>
    	</div><!-- .entry-content -->

    Well, that did it, thanks so much!! I am definitely unfamiliar in editing the code, so I appreciate the help. Would you recommend that I should create a child theme before doing changes like this, so that I have something to revert back to if I make a mistake?

    I really appreciate the help, thanks!!

    Would you recommend that I should create a child theme before doing changes like this, so that I have something to revert back to if I make a mistake?

    might be a good idea;

    back-up copies are also quite useful.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Featured Image’ is closed to new replies.