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 1 reply, has 2 voices, and was last updated by  cdils 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 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: 301

    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.

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

You must be logged in to reply to this topic.