Support » Themes and Templates » Associated Photo, ala Ma.tt

Associated Photo, ala Ma.tt

  • I’m playing around with the new Gallery feature in 2.5, but I can’t seem to find any extensive documentation on it.

    Basically, what I’m wanting to do is create a gallery by uploading some photos, then pull the first photo in the gallery (the thumbnail) and use it as a “feature” image on the blog homepage, kinda like Matt does on his homepage for the posts that have galleries.


    Anyone have any ideas? I’d email Matt, but I don’t want to bother him with this kind of question.


Viewing 3 replies - 1 through 3 (of 3 total)
  • bump … sorry, I posted this late last night.

    The gallery pulls the children of the post like this:

    $attachments = get_children("post_parent=$id&post_type=attachment&post_mime_type=image&orderby=menu_order ASC, ID ASC");

    If you were to do that in the theme, possibly in the Loop, then you could look at the first attachment in that array to see the first attachment and get its thumbnail and such. You’d use wp_get_attachment_link($attachment-id, 'thumbnail', true) to get the link to the thumbnail.

    yeah, that is the basic code, but i have a minitutorial with 2 functions.
    http://paraksaber.com search “Como tener un Gallery como el de Ma.tt” and you got to found where put this code in spanish. maybe i can upload my category-#.php file for your help

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Associated Photo, ala Ma.tt’ is closed to new replies.
Skip to toolbar