Hi there,
It’s because of this part, your stack is ethos but you set your text to non-ethos
if ( $stack == 'ethos' ) {
$left_icon = '<i class="x-icon-chevron-left" data-x-icon=""></i>';
$right_icon = '<i class="x-icon-chevron-right" data-x-icon=""></i>';
} else {
$left_icon = '<i class="x-icon-arrow-left" data-x-icon=""></i> Previous Post';
$right_icon = 'Next Post <i class="x-icon-arrow-right" data-x-icon=""></i>';
}
Should be like this,
if ( $stack == 'ethos' ) {
$left_icon = '<i class="x-icon-arrow-left" data-x-icon=""></i> Previous Post';
$right_icon = 'Next Post <i class="x-icon-arrow-right" data-x-icon=""></i>';
} else {
$left_icon = '<i class="x-icon-chevron-left" data-x-icon=""></i>';
$right_icon = '<i class="x-icon-chevron-right" data-x-icon=""></i>';
}
About post of the same category, please change this
$prev_post = get_adjacent_post( false, '', false );
$next_post = get_adjacent_post( false, '', true );
to this
$prev_post = get_adjacent_post( true, '', false );
$next_post = get_adjacent_post( true, '', true );
Thanks!