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.

有帮助吗?

解决方案

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'

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top