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.
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.
thisisshawn
Member
Posted 4 years ago #
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