• I run the following :

    <div id="blog">
        	  <div id="blog1">
        	  <a href="http://advanceperformance.com/news/?cat=14"><img src="images/feed_head_whatsnew.gif" width="250" height="25" alt="" /></a>
    <?php query_posts('showposts=3&cat=14'); ?>
          <?php while (have_posts()): the_post(); ?>
    	                       <div class="postmeta2">
    	                           <div class="meta2inner">
    	                               <div class="pday"><?php the_time('j'); ?></div>
    	                               <div class="pmonth"><?php the_time('M/y'); ?></div>
    	                           </div>
                        </div>
            <div class="text">
    
                        <h4><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h4>
    
            <a href="<?php the_permalink(); ?>">Read More...</a>
            </div>
            <br />
            <?php endwhile; ?>

    And it works great but I am having trouble using
    <?php the_post_thumbnail();?>

    In order to get the first image out of the post and display.

    Any help would be greatly appreciated.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Do you want to display the first image that’s in the post content, or the featured image?

    the_post_thumbnail(); shows the image that is uploaded as the featured image — not any images that are placed in the post content.

    Thread Starter chewbears

    (@chewbears)

    Seriff, I am looking to display the first image that’s in the post content.

    Thanks

    The image you want to show is part of the content — it’s a little tricky to try to pull it from the actual post content and then display it on an external page.

    Things would be easier if you would actually upload a featured image for your post. You don’t have to show that image in your regular content, but if you want to show it on an external page, you can simply use the_post_thumbnail().

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Usage of include WordPress on external page’ is closed to new replies.