Hey. I’m wanting to remove the next/previous post option from my ethos posts and rather use the revolution slider ‘related posts’ option, which I’ve already gotten set up.
How can I take out the bits at the top that move between posts?
thanks!
Hey. I’m wanting to remove the next/previous post option from my ethos posts and rather use the revolution slider ‘related posts’ option, which I’ve already gotten set up.
How can I take out the bits at the top that move between posts?
thanks!
Hi there,
Please add this code in the custom CSS:
.x-nav-articles {
display: none;
}
Hope this helps.
Thank You. And how can I set it instead to the next/previous post relative to that * category *?
(curious. playing with options. have an ongoing journal and only want to move between posts in a particular category)
Hi There,
To do that, please add the following code under functions.php file locates in your child theme:
function x_entry_navigation() {
$stack = x_get_stack();
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>';
$right_icon = '<i class="x-icon-arrow-right" data-x-icon=""></i>';
}
$is_ltr = ! is_rtl();
$prev_post = get_adjacent_post( true, '', false );
$next_post = get_adjacent_post( true, '', true );
$prev_icon = ( $is_ltr ) ? $left_icon : $right_icon;
$next_icon = ( $is_ltr ) ? $right_icon : $left_icon;
?>
<div class="x-nav-articles">
<?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; ?>
</div>
<?php
}
Hope it helps 
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.