Codex tools: Log in
Languages: English • Bahasa Indonesia • 日本語 • (Add your language)
Contents |
Displays page-links for paginated posts (i.e. includes the <!--nextpage--> Quicktag one or more times). This works in much the same way as link_pages() (deprecated), the difference being that arguments are given in query string format. This tag must be within The_Loop.
<?php wp_link_pages( $args ); ?>
<?php $args = array(
'before' => '<p>' . __('Pages:'),
'after' => '</p>',
'link_before' => '',
'link_after' => '',
'next_or_number' => 'number',
'nextpagelink' => __('Next page'),
'previouspagelink' => __('Previous page'),
'pagelink' => '%',
'echo' => 1
); ?>
Displays page-links by default with paragraph tags before and after, using Next page and Previous page, listing them with page numbers as Page 1, Page 2 and so on.
<?php wp_link_pages(); ?>
Displays page-links wrapped in paragraph tags.
<?php wp_link_pages('before=<p>&after=</p>&next_or_number=number&pagelink=page %'); ?>
Displays page-links in DIV for CSS reference as <div id="page-links">.
<?php wp_link_pages('before=<div id="page-links">&after=</div>'); ?>
Since: 0.71
wp_link_pages() is located in wp-includes/post-template.php.
Pagination: posts_nav_link(), next_posts_link(), previous_posts_link(), get_next_posts_link(), get_previous_posts_link(), paginate_links() wp_link_pages(), next_post_link(), previous_post_link(), next_image_link(), previous_image_link(),