this is what i would like to do…
In my site,each post can have several pictures, but also each post has an attached picture called: thumbnail {name of my post}, this specific picture was attached to the post with the multimedia gallery, and the objective of this picture is to appear in the category list.
<article>
<p class="the-picture"><img src="url-of-the-picture" /></a>
<p class="the-post-title"><a href="url-of-the-post">The post title</a></p>
<p class="the-post-excerpt">The post excerpt</p>
</article>
So basically that’s what i want to do, Maybe using get_post() but i can’t figure out how to do it from outside the post.
Thanks for your help
Ok… here is what I found so far:
The following code will get me the category i’m on:
So, now with the category i can list all the posts:
And for each post i can do this:
So, basically what i’m doing is looking for the ID of the child post which is marked as the thumbnail of the post and retrieving its information into $thumb. The answer that moraleida gave me was a nice start for my research. Thanks a lot.