• 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.

    https://ma.tt/

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

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Nathan Rice

    (@nathanrice)

    bump … sorry, I posted this late last night.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    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.
    https://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.