diff options
Diffstat (limited to 'inc/extras.php')
| -rw-r--r-- | inc/extras.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/inc/extras.php b/inc/extras.php index 94f7485..4ad648c 100644 --- a/inc/extras.php +++ b/inc/extras.php @@ -85,7 +85,7 @@ if ( ! function_exists( 'understrap_change_logo_class' ) ) { */ if ( ! function_exists ( 'understrap_post_nav' ) ) { - function understrap_post_nav() { + function understrap_post_nav($taxonomy = '') { // Don't print empty markup if there's nowhere to navigate. $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); @@ -100,10 +100,18 @@ if ( ! function_exists ( 'understrap_post_nav' ) ) { <?php if ( get_previous_post_link() ) { - previous_post_link( '<span class="col nav-previous text-left">%link</span>', _x( '<i class="fa fa-angle-left"></i> %title', 'Previous post link', 'understrap' ) ); + if ( '' != $taxonomy ) { + previous_post_link( '<span class="col nav-previous text-left">%link</span>', _x( '<i class="fa fa-angle-left"></i> %title', 'Previous post link', 'understrap' ), true, '', $taxonomy ); + } else { + previous_post_link( '<span class="col nav-previous text-left">%link</span>', _x( '<i class="fa fa-angle-left"></i> %title', 'Previous post link', 'understrap' ) ); + } } if ( get_next_post_link() ) { - next_post_link( '<span class="col nav-next text-right">%link</span>', _x( '%title <i class="fa fa-angle-right"></i>', 'Next post link', 'understrap' ) ); + if ( '' != $taxonomy ) { + next_post_link( '<span class="col nav-next text-right">%link</span>', _x( '%title <i class="fa fa-angle-right"></i>', 'Next post link', 'understrap' ), true, '', $taxonomy ); + } else { + next_post_link( '<span class="col nav-next text-right">%link</span>', _x( '%title <i class="fa fa-angle-right"></i>', 'Next post link', 'understrap' ) ); + } } ?> </div><!-- .nav-links --> |
