- This topic has 2 replies, 2 voices, and was last updated 4 years, 4 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Support › Forums › Flex Theme › How do I remove at bottom of posts?
Tagged: navigation
I would like to remove the <previous post next post> navigation that appears at the bottom of posts, thanks.
*** backup before making changes ***
1. In WordPress dashboard, go to Appearance > Editor
2. Click to open functions.php file.
3. Delete following code and save changes
//* 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>';
}
That worked very easy, thanks!