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

    Thread Starter kmaier

    (@kmaier)

    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(); ?>
      <li>
        <div class="post" id="post-<?php the_ID(); ?>">
        <?php echo get_the_post_thumbnail($page->ID, 'thumbnail'); ?>
        <?php the_title('<h3>', '</h3>'); ?>
        <?php
    	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...");
        ?>
    
    </div>
    
    </li>
    
    <?php endwhile; ?>

    https://dev.calbike.com/specials/

    Thread Starter kmaier

    (@kmaier)

    i ended up using this: <!–more–>
    https://codex.www.ads-software.com/Template_Tags/the_content

    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.