Viewing 1 replies (of 1 total)
  • Thread Starter Mike Rodriguez

    (@iammikerodriguez)

    Nevermind, I figured it out. For anyone else who is stuck, this is how I got to my result.

    <?php query_posts('showposts=1&category_name=topstories&offset=3'); ?>
    <?php while (have_posts()): the_post(); ?>  
    
    <?php $attachments = get_children( array('post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' =>'image',  'showposts' => 1) );
    foreach ( $attachments as $attachment_id => $attachment ) {
    echo wp_get_attachment_url( $attachment_id, 'medium' ); } ?>
    
    <?php endwhile; ?>
Viewing 1 replies (of 1 total)
  • The topic ‘How can i echo the featured image url?’ is closed to new replies.