Navigation inside multi-pages posts
-
Hi!
The Bootstrap 2.2the_bootstrap_link_pages not show <previouspagelink> and <nextpagelink> for multipage post.
may be fix below?function the_bootstrap_link_pages( $args = array() ) { wp_link_pages( array( 'echo' => 0 ) ); $defaults = array( 'next_or_number' => 'number', 'nextpagelink' => __( 'Next page', 'the-bootstrap' ), 'previouspagelink' => __( 'Previous page', 'the-bootstrap' ), 'pagelink' => '%', 'echo' => true ); $r = wp_parse_args( $args, $defaults ); $r = apply_filters( 'the_bootstrap_link_pages_args', $r ); extract( $r, EXTR_SKIP ); global $page, $numpages, $multipage, $more, $pagenow; $output = ''; if ( $multipage ) { if ( 'number' == $next_or_number ) { $output .= '<nav class="pagination pagination-small clear"><ul><li><span class="dots">' . __( 'Pages:', 'the-bootstrap' ) . '</span></li>'; if ( $more ) { $i = $page - 1; if ( $i && $more ) { $output .= '<li>' . _wp_link_page( $i ) . $previouspagelink. '</a></li>'; } } for ( $i = 1; $i < ($numpages + 1); $i++ ) { $j = str_replace( '%', $i, $pagelink ); if ( ($i != $page) || ((!$more) && ($page!=1)) ) { $output .= '<li>' . _wp_link_page($i) . $j . '</a></li>'; } if ($i == $page) { $output .= '<li class="current"><span>' . $j . '</span></li>'; } } if ( $more ) { $i = $page + 1; if ( $i <= $numpages && $more ) { $output .= '<li>' . _wp_link_page( $i ) . $nextpagelink. '</a></li>'; } } $output .= '</ul></nav>'; } } if ( $echo ) echo $output; return $output; }
Thanks,
With Regards
- The topic ‘Navigation inside multi-pages posts’ is closed to new replies.