• Resolved albaxter83

    (@albaxter83)


    Hi,

    Im trying to get the front page to display at least the first image from the post. I have tried selecting featured image but then this just displays the featured image both on the front page as well as in my post as well, which looks funny. It ends up putting the featured image at the top of the page, followed by the header (content) then the rest of the post.

    Since the featured image function doesn’t produce the desired results I am trying to figure out how to get the them to pull the first image from the post and display it on the Front Page along with the article summary/excerpt. Is this possible? If so, how?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author GavickPro

    (@gavickpro)

    Hello,

    If you want to hide the featured image on the single post page, please open file content.header and replace line:

    <?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>

    to:

    <?php if ( has_post_thumbnail() && !is_singular() && ! post_password_required() ) : ?>

    Thread Starter albaxter83

    (@albaxter83)

    While that works, it appears I was unclear in exactly what I wanted.

    On the Front Page:
    By default, only a text summary shows up for a new post. I would like the front page to show a picture in this order:

    Post title
    Picture
    Summary -> read more

    If I try to use the Featured Image, I get this instead:

    Picture
    Post title
    Summary -> read more

    I am attempting to move the picture below the post title on the front page. Can this be done by modifying the CSS code so that the post blurb on the front page just uses the first picture found on the single page post? If not, can I modify the featured image so that it shows up on the main page below the post title?

    Thanks again for the super fast response!

    Theme Author GavickPro

    (@gavickpro)

    Please try to modify the following fragment in the content-header.php file:

    <header class="entry-header">
    	<?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
    		<?php the_post_thumbnail(); ?>
    	<?php elseif($video_code) : ?>
    		<div class="video-wrapper">
    			<?php echo $video_code; ?>
    		</div>
    	<?php endif; ?>
    
    	<h<?php echo is_single() ? '1' : '2'; ?> class="entry-title<?php if(is_sticky()) echo ' sticky'; ?>">
    		<a href="<?php the_permalink(); ?>" rel="bookmark"><span><?php the_title(); ?></span></a>
    	</h<?php echo is_single() ? '1' : '2'; ?>>
    </header><!-- .entry-header -->

    to:

    <header class="entry-header">
    	<h<?php echo is_single() ? '1' : '2'; ?> class="entry-title<?php if(is_sticky()) echo ' sticky'; ?>">
    		<a href="<?php the_permalink(); ?>" rel="bookmark"><span><?php the_title(); ?></span></a>
    	</h<?php echo is_single() ? '1' : '2'; ?>>
    	<?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
    		<?php the_post_thumbnail(); ?>
    	<?php elseif($video_code) : ?>
    		<div class="video-wrapper">
    			<?php echo $video_code; ?>
    		</div>
    	<?php endif; ?>
    </header><!-- .entry-header -->
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Images on Front Page (w/o featured post)’ is closed to new replies.