• Resolved haywars

    (@haywars)


    Currently I am display specific posts on a certain page like this:

    <?php
    $post_id=794;
    $queried_post = get_post($post_id);
    $title = $queried_post->post_title;
    ?>

    How do i make it query the featured images as well?

    I tried

    <span>
    <?php
    $post_id=792;
    $queried_post = get_post($post_id);
    $title = $queried_post->post_content;
    $post_thumbnail_id = get_post_thumbnail_id( $post_id );
    $thumb = $post_thumbnail_id->post_thumbnail;?>
    <?php echo $queried_post->post_content; ?></span>
    <li><?php echo $thumb; ?></li>

    But that definitely doesn’t work.

    <?php the_post_thumbnail();?>

    That doesn’t work as well as I am querying specific posts and it has to tie into my first call. Any help?

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

The topic ‘Query Thumbnails?’ is closed to new replies.