Next Previous post links for current category only

[ad_1]

Hi All

I obtained this code from wpsites.net which added the Next/Previous Post links.

add_action( 'genesis_entry_content', 'custom_single_post_nav', 12 );
function custom_single_post_nav() {

	if ( ! is_singular( 'post' ) )
		return;

	echo '<div class="pagination-previous alignleft">';
	previous_post_link('%link', 'Previous Post', FALSE);
	echo '</div>';

	echo '<div class="pagination-next alignright">';
	next_post_link('%link', 'Next Post', FALSE);
	echo '</div>';

}

Is there a function I can add that will display the link for the next or previous post in the same category please?

Thanks

Rich

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer