Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Custom Post Navigation for Bootstrap Theme
- *
- * This function is replacement for:
- * @the_post_navigation();
- * and is used on single.php template, line: 61
- *
- * It shows nice and clear post navigation tailored to Bootstrap Theme
- *
- * @since The Bootstrap Blog 0.1
- **/
- function the_bootstrap_blog__the_post_navigation(){
- $n = "\n";
- $prev = get_adjacent_post( false, '', true );
- if( !empty( $prev ) )
- $prev = '<a class="btn btn-outline-primary" href="' . esc_url( get_permalink( $prev->ID ) ) . '" title="' . esc_attr( $prev->post_title ) . '">' . __( 'Previus post', 'the-bootstrap-blog') . '</a>';
- $next = get_adjacent_post( false, '', false );
- if( !empty( $next ) )
- $next = '<a class="btn btn-outline-secondary" href="' . esc_url( get_permalink( $next->ID ) ) . '" title="' . esc_attr( $next->post_title ) . '">' . __( 'Next post', 'the-bootstrap-blog') . '</a>';
- $post_pagination = "<nav class='blog-pagination mb-4'>{$n}{$prev}{$n}{$next}{$n}</nav>";
- echo $post_pagination;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement