identify featured image from attachment array
-
Maybe somebody has solved this. After retrieving posts, how do you tell which of the attached images is the featured image?
The featured image just shows up like a regular attachment, something like this:"attachments"=> [{"id"=>114, "url"=>"http://test.com/wp-content/uploads/2015/04/media-6bgImage.jpg", "slug"=>"media-6bgimage", "title"=>"media-6bgImage", "description"=>"", "caption"=>"", "parent"=>59, "mime_type"=>"image/jpeg", "images"=> { "full"=>{"url"=>"http://test.com/wp-content/uploads/2015/04/media-6bgImage.jpg", "width"=>1600, "height"=>1000}, "thumbnail"=>{"url"=>"http://test.com/wp-content/uploads/2015/04/media-6bgImage-150x150.jpg", "width"=>150, "height"=>150}, "medium"=>{"url"=>"http://test.com/wp-content/uploads/2015/04/media-6bgImage-300x188.jpg", "width"=>300, "height"=>188}, "post-thumbnail"=>{"url"=>"http://test.com/wp-content/uploads/2015/04/media-6bgImage-825x510.jpg", "width"=>825, "height"=>510} } } ]
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘identify featured image from attachment array’ is closed to new replies.