WordPress.org

Ready to get started?Download WordPress

Forums

Image Gallery Navigation like Matt (15 posts)

  1. kineda
    Member
    Posted 5 years ago #

    Can't find this in the documentation anywhere.

    Anyone know what template tag Matt is using to link the full size image to the next image in the gallery (not the thumbnail navigation)?

    For example:
    http://ma.tt/2008/09/first-day-in-beijing/mcm_0079/

    Click on the full size image, and it'll take you to the next image in the gallery.

  2. kineda
    Member
    Posted 5 years ago #

    No one has a clue what the template tag or query is?

  3. kineda
    Member
    Posted 5 years ago #

    Seems that their is no native template tag to perform this style of navigation. If anyone is interested, I have a custom plugin that will handle this.

  4. omgitztrey
    Member
    Posted 5 years ago #

    I'm highly interested. I have a gallery that is a pain in the ass. I want something like facebook has where the large image loads and all they have to do is click on it to move to the next image.

    treycruz.com

  5. kineda
    Member
    Posted 5 years ago #

    Give one of my galleries a test drive:
    http://www.kineda.com/kana-tsugihara-2/

    Clicking a full size image will link you to the next image in the gallery. At the last image in the gallery, you have the option in the to either loop back to the first image or return to the main gallery page.

  6. kicksonfire
    Member
    Posted 5 years ago #

    Hey Kineda,
    Your blog is simply amazing. It's great what you have done with it. I am also working on mine and have ran into a problem which I know you can solve. My goal is to make the images in my gallery clickable so when the user clicks on it, it takes them to the next image. Please help me out!

  7. OperaManiac
    Member
    Posted 5 years ago #

    i had like that functionality too!

  8. jtonline
    Member
    Posted 5 years ago #

    I used the code supplied by yoshi in this topic inside my image.php file.

    Now, when a viewer clicks on a photo in one of my albums the next one in sequence is shown, as demonstrated here.

  9. Tarmu
    Member
    Posted 5 years ago #

    How can I show the total number of photo's in a gallery? Just like the demonstrated page jtonline posted above.

  10. jtonline
    Member
    Posted 5 years ago #

    How can I show the total number of photo's in a gallery?...

    If you set-up and assign your albums to a "Gallery" Category, make a note of the ID number assigned by WordPress for the chosen Category.

    If, say, your Gallery Category turns out to have an ID of 10, you need to create a template file called "category-10.php" in your theme. You use that file to list your albums to suit your particular theme design.

    Within the template file, in the code loop that displays each album title and description etc., simply include the line:

    This album contains <?php echo $count ?> images.

    If you use a search engine on the web, you'll find that people have written tutorials on how to achieve various results with the inbuilt WordPress gallery functions. There is also some info to be found in the official WordPress Codex.

  11. Tarmu
    Member
    Posted 5 years ago #

    @jtonline:

    What file should I copy and rename to category-$catid.php? If I create a whole new template it only changes de layout of the post on single pages only. Not in the main index.

  12. Tarmu
    Member
    Posted 5 years ago #

    I also managed to get the total number of images to work. But also this works only on the single post view, and not in the post index.

    <?php if ( in_category('4') ): ?>
    This album contains: <?php echo $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_parent = '$post->ID' AND post_type = 'attachment'" ); ?> pics.

    This is not in a different template, but the single.php
    Doesn't work on index

  13. jtonline
    Member
    Posted 5 years ago #

    ...If I create a whole new template it only changes de layout of the post on single pages only. Not in the main index...

    The thread here started 10 months ago by lylo2005 should enable you to get an idea of what I did to create a category template that generates an album index.

    I'm not sure you are using the same way of arranging your albums. To get an album index page I created a category template as above and then to display a count of the number of photos in each album you only need that one simple line of code quoted in my post above.

  14. Tarmu
    Member
    Posted 5 years ago #

    Thanks for your support. I got everything setup now as how I like it :)

    The only thing I'm still looking for is the random image script that ma.tt uses in his sidebar.

  15. vsellis
    Member
    Posted 5 years ago #

    Don't know if you'll find this useful but posted a tutorial on this a month or so ago...
    http://blackbox-tech.com/blog/wordpress-gallery-tutorial-as-seen-on-matt/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.