Created
March 24, 2025 18:48
-
-
Save cre8tivediva/e08d70b7c88678c77a7adbc752b0491a to your computer and use it in GitHub Desktop.
// Add post navigation to CPT in Kadence - change portfolio to your CPT name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add post navigation to CPT in Kadence - change portfolio to your CPT name | |
add_action( 'kadence_single_after_inner_content', 'add_post_nav_to_specific_cpt' ); | |
function add_post_nav_to_specific_cpt() { | |
if ( is_singular( 'portfolio' ) ) { | |
echo '<div class="cpt-post-nav">'; | |
the_post_navigation( array( | |
'prev_text' => '« %title', | |
'next_text' => '%title »', | |
) ); | |
echo '</div>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment