adjacent_image_link( bool $prev = true, string|int[] $size = ‘thumbnail’, bool $text = false )

In this article

Displays next or previous image link that has the same post parent.

Description

Retrieves the current attachment object from the $post global.

Parameters

$prevbooloptional
Whether to display the next (false) or previous (true) link.

Default:true

$sizestring|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'

$textbooloptional
Link text.

Default:false

Source

* @since 2.5.0
*
* @param bool         $prev Optional. Whether to display the next (false) or previous (true) link. Default true.

Changelog

VersionDescription
2.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.