Viewing 2 replies - 1 through 2 (of 2 total)
  • Stoobie_Land

    (@stoobie_land)

    Adding a page’s featured image would be fantastically useful. I already use this code to extract featured images from recent posts on my website.

    <?php						$the_query = new WP_Query('posts_per_page=2&orderby=date&order=desc');
    							while ($the_query->have_posts()) : $the_query->the_post(); ?>
    									<div clastewart-ss="latest-post">
    										<div class="latest-title"><a title="<?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?> - <?php the_time(get_option('date_format')); ?></a></div>
    
    <a href="<?php the_permalink() ?>">										<?php the_post_thumbnail(array(300,169), array ('class' => 'alignleft')); ?>
    </a>
    
    <div class="stewart-more">
    <p>
    <?php the_excerpt('Read More...'); ?>
    </p>
    </div>
    
    <div class="h-line"></div>
    </div>
    
    <?php endwhile; ?>
    <?php wp_reset_query(); ?>

    Anyone know how to add this to the php file? And where to add? I am a php newbie so I get a little confused.

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