Hi, I have added code in functions.php to stay in the portfolio categories when using the arrows and that works great. The only things is that the arrows now are gone on my blog page.
Is it possible to get them back with adjusting the code?
Hope you can assist.
/*** stay in navigation portfolio ***/
// Entry Navigation - In Same Term
// =============================================================================
if ( ! function_exists( ‘x_entry_navigation’ ) ) :
function x_entry_navigation() {
$stack = x_get_stack();
if ( $stack == ‘ethos’ ) {
$left_icon = ‘’;
$right_icon = ‘’;
} else {
$left_icon = ‘’;
$right_icon = ‘’;
}
$is_ltr = ! is_rtl();
if ( x_is_portfolio_item() ) {
$taxonomy = ‘portfolio-category’;
} else {
$taxonomy = ‘post’;
}
$prev_post = get_adjacent_post( true, ‘’, false, $taxonomy );
$next_post = get_adjacent_post( true, ‘’, true, $taxonomy );
$prev_icon = ( $is_ltr ) ? $left_icon : $right_icon;
$next_icon = ( $is_ltr ) ? $right_icon : $left_icon;
?>
<?php if ( $prev_post ) : ?>
<a href="<?php echo get_permalink( $prev_post ); ?>" title="<?php __( 'Previous Post', '__x__' ); ?>" class="prev">
<?php echo $prev_icon; ?>
</a>
<?php endif; ?>
<?php if ( $next_post ) : ?>
<a href="<?php echo get_permalink( $next_post ); ?>" title="<?php __( 'Next Post', '__x__' ); ?>" class="next">
<?php echo $next_icon; ?>
</a>
<?php endif; ?>