Use previous_image_link
and next_image_link
in a image.php or attachment.php file.
<nav id="image-navigation" class="navigation image-navigation">
<div class="nav-links">
<?php previous_image_link( false, '<div class="previous-image">' . __( 'Previous Image', '$text_domain' ) . '</div>' ); ?>
<?php next_image_link( false, '<div class="next-image">' . __( 'Next Image', '$text_domain' ) . '</div>' ); ?>
</div><!-- .nav-links -->
</nav><!-- #image-navigation -->
Source: Twenty Fourteen
Related Posts:
- Previous & Next on Index Page broken
- Get Next / Prev 3 Posts in Relation to Current Post
- wp_nav_menu: check if the list item has children and add a class to anchor link
- Add custom meta to nav menu items
- Display navigation menu item conditionally based on user capabilities
- Remember the last post I read
- Export navigation menu
- Navigate with keyboard in Gallery shortcode
- Prev/Next child navigation for current page?
- List child pages of a specific page
- How to modify the “after” of last element in wp_nav_menu
- How do I retrieve menu items from one level only?
- Edit HTML of WordPress navigation bar
- Using FlexNav with WordPress [closed]
- Get next/previous cousin page
- Customizing Walker_Nav_Menu
- Get only the path from a function like previous_post_link
- Posts archive index pagination in a static page custom query
- Break apart wp_list_pages in order to customise it
- Text symbols in the navigation menu
- Can this navigation be done easily in WordPress?
- Making some links generated from the wp_nav-menu function unclickeable?
- Loop – how to get previous/next post for first/last post?
- Trouble with wp_nav_menu, conditional tags and fallback_cb
- Using dividers in menu navigation – where to add code?
- Twenty Eleven theme- have custom landing page, change nav “home” link
- Exclude Post Format from next_post and prev_post
- Using query_posts inside single.php loop
- posts_nav_link on single.php
- I need ideas for a complicated menu
- How to get back to same page of post-list – after updating a post
- how to change site tag line for particular pages
- dropdown navigation menu
- Bootstrap Navwalker not displaying
- Next and Previous loop
- How to add show/hide in navigation setting for pages
- Home Custom Menu Link not Working
- How Do I Add Next and Previous Links On Single Custom Post Type Only?
- Menu with parents, children and or siblings pages display
- get_previous_post in same categories
- Inserting specific images inside navigation menu
- Navigational drop-down lists in WordPress?
- Select first child/subpage item in wp list pages
- Fallback_cb is messing around with containers
- Only show top-level links in site navigation
- Current navigation highlight for a menu that may be modified by the user?
- wp_list_pages to show all pages on all sub pages
- Next Previous siblings child pages
- get_adjacent_post() returning weird results
- How to Next and Prevous Navigation Buttons on the end of the page with custom image Using Wp Post Navigation Plugin
- WordPress – Responsive navbar doesnt work
- Adding dropdown box to WordPress menu
- get_adjacent_post – in same term or category not working
- Exclude post format from navigation
- How to make previous_post_link into an image [duplicate]
- How to add swipe action to wordpress pages
- Walker_Nav_menu access parent menu name
- Can I use multiple nav_walkers?
- (Bluehost) navigating to the dashboard via mydomain.com/wp-admin/ results in directory listing
- Implementing the twentythirteen responsive menu in twentytwelve
- Using characters to separate menus in navigation bar
- next and previous year month and day for archive page
- Exlude pages from wp_list_pages
- How to hide ‘Home’ button from appearing on supages – twenty eleven theme
- Add title for previous and next posts to Yoko Theme
- How Do I Add Images To Main Navigation Menu
- reverse next/prev page order
- How to add rel=”nofollow” to wp_list_pages?
- How to list pages with thumbnails, adding a “current-item” class
- Check if current post is the latest (not last)
- How does the Twenty Twelve Navigation Bar work?
- navigation link based on custom field
- How can I add a delay to the collapsible menu in Twenty Eleven?
- Switch form Next/Previous to post title
- add a menu item to navigation menu to link to external url
- Styling Previous/Next Pages differently from Index
- Using categories on navigation bar instead of pages
- confused about wp_list_pages() function – how to display selected top pages with all their subpages
- Get previous/next post from (specific) category
- navbar remove box shadow
- body_class(); not working with bootstrap navbar fixed top?
- Display greyed out nav link when there’s not a next or previous post
- Ussing page_navi with WP_Query
- Set custom id to list element walker custom function
- Ecommerce Single Product Next Product Link
- Logo on the tab
- Top Nav submenus wpon’t stay open – only in FF and only sometimes [closed]
- Display all posts thumbnails when viewing a single post
- Is wp3.8 / twenty fourteen’s Sticky Nav & Responsive – core or theme based
- Setting Up “Split Site” Navigation in WordPress
- How can I change the prev / next buttons text to Dutch?
- Modifying navigation menu classes with a Walker
- How To Show Get Adjacent Posts If Posts Are Sorted By Custom Field
- Add ID to target navigation link
- New Page Position
- Possible to hide Page if no posts from a CPT?
- Listing Sub-Pages & Sub-Sub-Pages
- Show multiple next and previous posts
- navigation doesn’t work in custom header.php
- Next/Previous links doesn’t work in the same category