next_image_link()
Displays a link to the next image attached to the post.
Uses: adjacent_image_link()
No Hooks.
Returns
null. Ready HTML A tag.
Usage
<?php next_image_link( $size, $text ); ?>
- $size(string/array)
- The size of the image the link should point to.
Default: 'thumbnail' - $text(string)
- The text (anchor) of the link.
Default: false
Examples
#1 Basic example
<div class="alignright"><?php next_image_link() ?></div>
#2 More examples
See the identical function previous_image_link().
Changelog
| Since 2.5.0 | Introduced. |
next_image_link() next image link code WP 6.8.3
function next_image_link( $size = 'thumbnail', $text = false ) {
echo get_next_image_link( $size, $text );
}