[theme-reviewers] The_post_thumbnail function bug?
kwight at kwight.ca
Wed Feb 1 20:44:06 UTC 2012
My first thought would be simply to check if get_the_post_thumbnail returns
empty; if not, use the returned image, if so, pull the first image from the
post. This would avoid mucking with the_post_thumbnail altogether. (I
haven't tested any of this, just a hunch from taking a look at
The best place to ask would be the theme support forums:
On 1 February 2012 14:26, ethan anwar <ethananwar at yahoo.com> wrote:
> Hello everybody!
> Hope I'm not bothering and I hope this isn't the wrong place but I know
> you guys are into WordPress and have a lot of experience.
> For my Mantra theme I created a short function that automatically gets the
> first image from a post with the thought of using that as a thumbnail
> featured image in case one is not selected.
> So once I have that custom image's src attribute i thought of doing this :
> the_post_thumbnail( array($width,$height), array("class" =>
> "post_thumbnail" , "src" => $my_custom_src )); or even just
> the_post_thumbnail( array("src" => $my_custom_src ));
> So I want the the_post_thumbnail function to use and show my custom image.
> But nothing happens. I can even type the address of an image on the site
> that exists and is verified. And still nothing happens, not even a warning
> or an error. If I remove the src part out of the array eveything functions
> normally. But I do see the src as an attribute in the the_post_thumbnail's
> function description.
> The weird thing is that it worked previously to 3.3.1. Or so I thought.
> Thanks a lot !
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the theme-reviewers