How to remove pagination in category archive pages

Community Forums Forums General Discussion How to remove pagination in category archive pages

This topic is: not resolved

This topic contains 2 replies, has 3 voices, and was last updated by  Tom 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #12079

    lazif
    Participant

    I am using studiopress Metric Child Theme.  There is a bug in Genesis Theme frame work. If pagination is used  the category and search page excerpts also diplaying pagination.  It could not be removed by unhooking    genesis_posts_nav().   How can I remove post navigation links (pagination) – [numeric paginaion 1 2 3 4 g links] in category archive and search page. Thanks in advance.  I have searched and googled for the solution. But no body is discussing the topic.

    #12660

    cdils
    Participant
    Post count: 420

    You might be able to try something like this:

    /** Remove Pagination from post type archives **/
    add_action('parse_query', 'cd_nopaging');
    function cd_nopaging($query) {
        if (is_post_type_archive()) {
            $query->set('nopaging', 1);
        }
    }

    You can reference the WordPress Codex in case is_post_type_archive() isn’t the right conditional check for your case.

    http://codex.wordpress.org/Conditional_Tags

    Cheers,

    Carrie


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. :)

    I tweet @cdils.

    #68690

    Tom
    Participant
    Post count: 690

    This didn’t quite work for me (on a long search for a solution) but I did find one from Bill Erickson in his article: Customizing the WordPress Query [Change Posts Per Page].

    Just replace ’18′ with ‘-1′ to display all posts and adjust to apply to your page(s).

    Additional reference here: http://codex.wordpress.org/Class_Reference/WP_Query#Pagination_Parameters


    Choose your next site design from over 300 Genesis themes.
    Updates via GenesisThemes.ca | Twitter | Google+ | Tumblr

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.