Support » Fixing WordPress » pull just an image from the_content

Viewing 4 replies - 1 through 4 (of 4 total)
  • Can you use get_the_post_thumbnail?

    interesting. giving it a shot but it isn’t coming through.

    <?php $temp_query = $wp_query; ?>
    <?php query_posts("category_name='specials'&showposts="); ?>
    <?php while (have_posts()) : the_post(); ?>
        <div class="post" id="post-<?php the_ID(); ?>">
        <?php echo get_the_post_thumbnail($page->ID, 'thumbnail'); ?>
        <?php the_title('<h3>', '</h3>'); ?>
    	global $more;    // Declare global $more (before the loop).
    	$more = 0;       // Set (inside the loop) to display content above the more tag.
    	the_content("Read More...");
    <?php endwhile; ?>

    i ended up using this: <!–more–>

    but thinking your way may be a better way to go

    You must use WP 2.9.0 or later, and did you see this Note in the article?

    To enable post thumbnails, the current theme must include add_theme_support( 'post-thumbnails' ); in its functions.php file.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘pull just an image from the_content’ is closed to new replies.