I have a custom post type and using this function to add for posts, previous and next buttons.
The problem is that within the custom post type, I have subcategories defined by a custom field category
.
Is there a way to limit the previous and next post link for items only within the same category of the current post?
function crunchify_post_navigation(){
?>
<div class="arrowNav">
<div class="arrowLeft">
<?php previous_post_link('%link', '↞', FALSE); ?>
</div>
<div class="arrowRight">
<?php next_post_link('%link', '↠', FALSE); ?>
</div>
</div>
<?php
}
add_action('wp_footer', 'crunchify_post_navigation');