Displays next or previous image link that has the same post parent.
Description
Retrieves the current attachment object from the $post global.
Parameters
$prev
booloptional- Whether to display the next (false) or previous (true) link.
Default:
true
$size
string|int[]optional- Image size. Accepts any registered image size name, or an array of width and height values in pixels (in that order). Default
'thumbnail'
.Default:
'thumbnail'
$text
booloptional- Link text.
Default:
false
Source
function adjacent_image_link( $prev = true, $size = 'thumbnail', $text = false ) {
echo get_adjacent_image_link( $prev, $size, $text );
}
Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.