Support › Forums › General Tips › Previous Post & Next Post Settings › Reply To: Previous Post & Next Post Settings
November 25, 2015 at 6:04 pm
#683
Moderator
Add the following code at end of functions.php file.
//* Showing post nav in single post page
add_action( 'genesis_after_entry', 'flex_prev_next_post_nav', 5 );
function flex_prev_next_post_nav() {
if ( ! is_singular( 'post' ) )
return;
genesis_markup( array(
'html5' => '<div %s>',
'xhtml' => '<div class="navigation">',
'context' => 'adjacent-entry-pagination',
) );
echo '<div class="pagination-previous alignleft">';
if( is_rtl() )
previous_post_link('<span class="dashicons dashicons-arrow-right-alt2"></span> '. __('Previous Post', 'flex') . '<br/>%link');
else
previous_post_link('<span class="dashicons dashicons-arrow-left-alt2"></span> '. __('Previous Post', 'flex') . '<br/>%link');
echo '</div>';
echo '<div class="pagination-next alignright">';
if( is_rtl() )
next_post_link(__('Next Post', 'flex') . ' <span class="dashicons dashicons-arrow-left-alt2"></span><br/>%link');
else
next_post_link(__('Next Post', 'flex') . ' <span class="dashicons dashicons-arrow-right-alt2"></span><br/>%link');
echo '</div>';
echo '</div>';
}