Automatically display an image in the beginning of a post

Viewing 2 posts - 1 through 2 (of 2 total)
  • #15624
    rollo
    Participant

    In the demo site of Pinboard (see link) it looks like all single posts contain the same image as on the index side, e.g. the post Morning Latte. Can I easily make a setting in order to automatically display an image att the beginning of a post? Anyone knew how to do? Thanks.

    http://demo.onedesigns.com/pinboard/

    #15652
    Daniel Tara
    Keymaster

    Images on the front page are featured images and on single posts are added manually. To display featured images automatically you need to replace this code in single.php:

    <?php if( has_post_format( 'audio' ) ) : ?>
    	<p><?php pinboard_post_audio(); ?></p>
    <?php elseif( has_post_format( 'video' ) ) : ?>
    	<p><?php pinboard_post_video(); ?></p>
    <?php endif; ?>

    with this:

    <?php if( has_post_format( 'audio' ) ) : ?>
    	<p><?php pinboard_post_audio(); ?></p>
    <?php elseif( has_post_format( 'video' ) ) : ?>
    	<p><?php pinboard_post_video(); ?></p>
    <?php else : ?>
    	<?php pinboard_post_thumbnail(); ?>
    <?php endif; ?>
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.