Afaq Shahid
Afaq Shahid

Reputation: 63

How to remove paginated posts' navigation of Genesis 2.0?

I am using Genesis 2.0 (bone stock, no child theme) for my website. And for some of the posts i've divided them into multi parts using the tag of WordPress. Now to navigate these pages, i've made my own functions. However, Genesis 2.0 has its own navigation but I want to remove that. But I cant find the function which executes this navigation, can anyone please tell me how do I remove that?

Thanks.

Upvotes: 1

Views: 1252

Answers (1)

michaelcarwile
michaelcarwile

Reputation: 86

The snippet you need to simply remove page navigation (pagination) with Genesis 2.0 is:

remove_action( 'genesis_after_endwhile', 'genesis_posts_nav' );

An example conditional using this is:

add_action ( 'genesis_after_entry', 'sk_remove_pagination' );
function sk_remove_pagination() {
    if ( is_home() ) {

        remove_action( 'genesis_after_endwhile', 'genesis_posts_nav' );

    }
}

Sources:
https://gist.github.com/braddalton/5030437
http://sridharkatakam.com/remove-pagination-posts-page-genesis/
Google 'genesis remove pagination'

Upvotes: 1

Related Questions