Hi there,
So, I see this is a popular question and I tried to implement it myself but I can’t quite get it right.
I want to add buttons for previous and next post to the bottom of each post.
I need them to stay within the category, for instance if they are looking at a news article when they click on next, it should go to the next news article, not the next blog post chronologically.
I found the post regarding adding global content area with buttons, I was able to insert it into the functions.php section of my child theme. I saw some code for Integrity that restricted it to default category but I am not using the breadcrumbs nav.
Can you tell me what i need to add to the functions php file to make it stay within category? thanks!
this is the current code:
function custom_post_arrows() {
if ( is_single() ) {
echo do_shortcode(’[cs_gb id=1942]’);
}
}
add_action(‘x_before_the_content_end’, ‘custom_post_arrows’);