Warning: This function has been deprecated. Use wp_link_pages() instead.

link_pages() WordPress Function

The link_pages() function is used to create a list of links to the pages in a post. It is useful for creating a table of contents for a long post. The function can be used with or without a format parameter. If no format parameter is specified, the function will return a list of links to the pages in the post.

link_pages( string $before = '<br />', string $after = '<br />', string $next_or_number = 'number', string $nextpagelink = 'next page', string $previouspagelink = 'previous page', string $pagelink = '%', string $more_file = '' ) #

Print list of pages based on arguments.


Description

Top ↑

See also


Top ↑

Parameters

$before

(string)(Optional)

Default value: '<br />'

$after

(string)(Optional)

Default value: '<br />'

$next_or_number

(string)(Optional)

Default value: 'number'

$nextpagelink

(string)(Optional)

Default value: 'next page'

$previouspagelink

(string)(Optional)

Default value: 'previous page'

$pagelink

(string)(Optional)

Default value: '%'

$more_file

(string)(Optional)

Default value: ''


Top ↑

Return

(string)


Top ↑

Source

File: wp-includes/deprecated.php

function link_pages($before='<br />', $after='<br />', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page',
					$pagelink='%', $more_file='') {
	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_link_pages()' );

	$args = compact('before', 'after', 'next_or_number', 'nextpagelink', 'previouspagelink', 'pagelink', 'more_file');
	return wp_link_pages($args);
}


Top ↑

Changelog

Changelog
VersionDescription
2.1.0Use wp_link_pages()
0.71Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More