Genesis CPT Navigation Links
<?php //<~ dont add me in
add_action( 'genesis_entry_footer', 'wpb_prev_next_post_nav_cpt' );
function wpb_prev_next_post_nav_cpt() {
if ( ! is_singular( array( 'portfolio', 'post' ) ) ) //add your CPT name to the array
return;
genesis_markup( array(
'html5' => '<div %s>',
'xhtml' => '<div class="navigation">',
'context' => 'adjacent-entry-pagination',
) );
echo '<div class="pagination-previous alignleft">';
previous_post_link('« %link', 'Previous Post'); // Change nav text here
echo '</div>';
echo '<div class="pagination-next alignright">';
next_post_link(' %link »', 'Next Post'); // Change nav text here
echo '</div>';
echo '</div>';
}
<?php //<~ dont add me in
add_action( 'genesis_entry_footer', 'wpb_prev_next_post_nav_cpt' );
function wpb_prev_next_post_nav_cpt() {
if ( ! is_singular( array( 'portfolio', 'post' ) ) ) //add your CPT name to the array
return;
genesis_markup( array(
'html5' => '<div %s>',
'xhtml' => '<div class="navigation">',
'context' => 'adjacent-entry-pagination',
) );
echo '<div class="pagination-previous alignleft">';
previous_post_link();
echo '</div>';
echo '<div class="pagination-next alignright">';
next_post_link();
echo '</div>';
echo '</div>';
}
<?php //<~ dont add me in
add_action( 'genesis_entry_footer', 'wpb_prev_next_post_nav_cpt' );
function wpb_prev_next_post_nav_cpt() {
if ( ! is_singular( 'portfolio' ) ) //add your CPT name
return;
genesis_markup( array(
'html5' => '<div %s>',
'xhtml' => '<div class="navigation">',
'context' => 'adjacent-entry-pagination',
) );
echo '<div class="pagination-previous alignleft">';
previous_post_link();
echo '</div>';
echo '<div class="pagination-next alignright">';
next_post_link();
echo '</div>';
echo '</div>';
}