WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] WP2.5 gallery. Next/Prev image links. How?

[Resolved] WP2.5 gallery. Next/Prev image links. How?

  • Hi,
    how can I get the url and thumbnail for the next and previous image in the WP2.5 built-in gallery? I tried wp_get_attachment_url but I don’t know how to get the next or previous attachment id. What I try to achive is something like shown here. Notice two thumbnails below image with links to next and previous image.
    Deniss.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Samuel Wood (Otto)
    WordPress.org Tech Dude

    @otto42

    Look at the wp-includes/media.php file. See how the gallery shortcode does it.

    Thanks.
    wp-includes/media.php revealed two functions previous_image_link() and next_image_link() which return thumbnails with links to previous and next images.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] WP2.5 gallery. Next/Prev image links. How?’ is closed to new replies.