Display next previous button in genesis


(Mohd Kashif) #1

genesis me next previous button post aur comment section ke beech me kaise show kare me abhi ye code use karta hun is code se next previous post content ke niche aur tag aur category ke uar dikhai deta hai

add_action( 'genesis_entry_content', 'custom_single_post_nav', 12 );

function custom_single_post_nav() {

if ( ! is_singular( 'post' ) )
	return;

echo '<div class="pagination-previous alignleft">';
previous_post_link('%link', 'Previous Post', FALSE);
echo '</div>';

echo '<div class="pagination-next alignright">';
next_post_link('%link', 'Next Post', FALSE);
echo '</div>';

}


(Jumedeen khan) #2

Aap genesis_entry_content ki jagah genesis_before_comments add karo is tarah se

add_action( 'genesis_before_comments', 'custom_single_post_nav', 12 );
function custom_single_post_nav() {

	if ( ! is_singular( 'post' ) )
		return;

	echo '<div class="pagination-previous alignleft">';
	previous_post_link('%link', 'Previous Post', FALSE);
	echo '</div>';

	echo '<div class="pagination-next alignright">';
	next_post_link('%link', 'Next Post', FALSE);
	echo '</div>';

}