get_next_posts_link [ WordPress Function ]
get_next_posts_link ( $label = null, $max_page = 0 )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Similar Functions: get_next_posts_page_link, next_posts_link, get_edit_post_link, next_post_link, get_next_comments_link
Return the next posts page link.
Source
<?php
function get_next_posts_link( $label = null, $max_page = 0 ) {
global $paged, $wp_query;
if ( !$max_page )
$max_page = $wp_query->max_num_pages;
if ( !$paged )
$paged = 1;
$nextpage = intval($paged) + 1;
if ( null === $label )
$label = __( 'Next Page »' );
if ( !is_single() && ( $nextpage <= $max_page ) ) {
$attr = apply_filters( 'next_posts_link_attributes', '' );
return '<a href="' . next_posts( $max_page, false ) . "\" $attr>" . preg_replace('/&([^#])(?![a-z]{1,8};)/i', '&$1', $label) . '</a>';
}
}
?>
Examples [ wp-snippets.com ]
Top Google Search Results
- Function Reference/get next posts link « WordPress Codex
Description. Return a link to the set of posts of the current page. Usage. <?php echo get_next_posts_link(); ?> Parameters. $label: (string) (optional) The content ...
codex.wordpress.org - Curtis Henson - WordPress Posts Navigation Quick Tip
Dec 8, 2008 ... The code is pretty easy, just an if else statement. We are going to use the get_next_posts_link() and get_previous_posts_link() to test if there is ...
curtishenson.com - get_next_posts_link | A HitchHackers guide through WordPress
Feb 12, 2011 ... Source code. function get_next_posts_link( $label = null, $max_page = 0 ) { global $paged, $wp_query; if ( !$max_page ) $max_page ...
hitchhackerguide.com - PHPXRef 0.7 : WordPress : Function Reference: get_next_posts_link()
Function and Method Cross Reference. get_next_posts_link(). Defined at: /wp- includes/link-template.php -> line 1475. Referenced 2 times: ...
phpxref.ftwr.co.uk