Support » Fixing WordPress » Next and Previous Links in WP2.5 gallery
8 years, 11 months ago
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('« Older Entries') ?> but those are not working.
<?php next_posts_link('« Older Entries') ?>
8 years, 10 months ago
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.
8 years, 2 months ago
I tried this… and it worked… but I can’t get it to function in IE.
Any thoughts dliem?