next_image_link()
Displays next image link that has the same post parent.
Uses: adjacent_image_link()
No Hooks.
Return
null
. Nothing (null).
Usage
next_image_link( $size, $text );
- $size(string|int[])
- Image size. Accepts any registered image size name, or an array of width and height values in pixels (in that order).
Default: 'thumbnail' - $text(string|false)
- Link text.
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.7.1
function next_image_link( $size = 'thumbnail', $text = false ) { echo get_next_image_link( $size, $text ); }