WordPress.org

Support

Support » How-To and Troubleshooting » Next and Previous Links in WP2.5 gallery

Next and Previous Links in WP2.5 gallery

  • I would like to know the code to show up the links of next and previous attachments when an individual attachment (/?attachment_id=) is shown.

    I tried the usual posts links <?php next_posts_link('&laquo; Older Entries') ?> but those are not working.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You will want to use:

    <div class="alignleft"><?php previous_image_link() ?></div>
    <div class="alignright"><?php next_image_link() ?></div>

    And example of this can be found in the default theme that comes with wordpress 2.5 in the image.php file.

    When linking to attachments in wordpress gallery, it defaults to pulling from image.php. If image.php doesn’t exist it will default to single.php.

    Hope this helps.

    I tried this… and it worked… but I can’t get it to function in IE.

    Any thoughts dliem?

    http://wordpress.org/support/topic/247174?replies=2

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Next and Previous Links in WP2.5 gallery’ is closed to new replies.
Skip to toolbar