Title: next_post_rel_link
Published: April 25, 2014
Last modified: February 24, 2026

---

# next_post_rel_link( string $title, bool $in_same_term = false, int[]|string $excluded_terms, string $taxonomy )

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/next_post_rel_link/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/functions/next_post_rel_link/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/functions/next_post_rel_link/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/functions/next_post_rel_link/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/next_post_rel_link/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/next_post_rel_link/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/next_post_rel_link/?output_format=md#wp--skip-link--target)

Displays the relational link for the next post adjacent to the current post.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/next_post_rel_link/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/functions/next_post_rel_link/?output_format=md#see-also)󠁿

 * [get_adjacent_post_rel_link()](https://developer.wordpress.org/reference/functions/get_adjacent_post_rel_link/)

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/next_post_rel_link/?output_format=md#parameters)󠁿

 `$title`stringoptional

Link title format. Default `'%title'`.

`$in_same_term`booloptional

Whether link should be in the same taxonomy term.

Default:`false`

`$excluded_terms`int[]|stringoptional

Array or comma-separated list of excluded term IDs.
 Default empty.

`$taxonomy`stringoptional

Taxonomy, if `$in_same_term` is true. Default `'category'`.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/next_post_rel_link/?output_format=md#source)󠁿

    ```php
    function next_post_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
    	echo get_adjacent_post_rel_link( $title, $in_same_term, $excluded_terms, false, $taxonomy );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/link-template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/link-template.php#L2163)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/link-template.php#L2163-L2165)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/next_post_rel_link/?output_format=md#related)󠁿

| Uses | Description | 
| [get_adjacent_post_rel_link()](https://developer.wordpress.org/reference/functions/get_adjacent_post_rel_link/)`wp-includes/link-template.php` |

Retrieves the adjacent post relational link.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/next_post_rel_link/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.8.0](https://developer.wordpress.org/reference/since/2.8.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fnext_post_rel_link%2F)
before being able to contribute a note or feedback.