Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

How to pull the featured image url using the find function

$
0
0

Replies: 0

Hi,

I am using the tutorial from the find function the doc but can’t find a way to pull the featured image url from the pod data. When I use ‘post_thumbnail’ in the display function it returns me the full image html code. Can you please guide me in the right direction?


// Here's how to use find()
$params = array(
    'limit' => 3, 
    'page' => 2, 
    // Be sure to sanitize ANY strings going here
    'where'=>"category.name = 'My Category'"
);

// Run the find
$mypod = pods( 'mypod', $params );

// Loop through the records returned
while ( $mypod->fetch() ) {
    echo $mypod->display( 'post_thumbnail' ) . "\n";
}

Thank you


Viewing all articles
Browse latest Browse all 59525

Trending Articles