Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#33020 closed defect (bug) (invalid)

prev_text and next_text arguments for the_posts_navigation() reversed

Reported by: berubes's profile berubes Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1
Component: Themes Keywords:
Focuses: Cc:


I had trouble customizing the_posts_navigation() with arguments described in the Code Reference.

At link-template.php line 2299, there is the following.

		$next_link = get_previous_posts_link( $args['next_text'] );
		$prev_link = get_next_posts_link( $args['prev_text'] );

It appears that get_previous_posts_link and get_next_posts_link seem to be mixed up.

Change History (1)

#1 @obenland
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
  • Version changed from 4.2.2 to 4.1

The naming of get_previous_posts_link() and get_next_posts_link() is a bit confusing in the context of this template tag.

get_next_posts_link() will return a link to the page of older (previous) posts , while get_previous_posts_link() will return a link to the page of newer (next) posts published after where you are in tim.

Does that make sense?

So prev_text is for the link to the posts previous to the list of posts you currently see.

Note: See TracTickets for help on using tickets.