WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] trying paginate category list (18 posts)

  1. gbaka
    Member
    Posted 3 years ago #

    trying to page the wp list category function or something along those lines where i can paginate a list of all my categories?

  2. timduncan
    Member
    Posted 3 years ago #

    i am looking for the same thing

  3. timduncan
    Member
    Posted 3 years ago #

    do you need a 1 2 3 4 pagination?

  4. gbaka
    Member
    Posted 3 years ago #

    yea but paginating the a list of categories is the tricky part

  5. timduncan
    Member
    Posted 3 years ago #

    i don't quite understand, maybe you have an example? i have just done today some paginating with categories, maybe it is what are you looking for.

  6. gbaka
    Member
    Posted 3 years ago #

    wp category list() trying to paginate that, or something similar so I'm not paginating any post at all

  7. timduncan
    Member
    Posted 3 years ago #

    <?php
    $cat = 'noticias';
    $category=get_category($cat);
    ?>
    <?php
    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts( array('cat' => 9, 'paged'=>$page, 'showposts'=>4) );
    while (have_posts()) : the_post(); ?>

    hope this helps

  8. timduncan
    Member
    Posted 3 years ago #

    any results?

  9. gbaka
    Member
    Posted 3 years ago #

    yea pretty sure this won't do it as paging a list of categories is not that simple, and this pages post but thanks for the help really appreciate it

  10. timduncan
    Member
    Posted 3 years ago #

    if still not working, try adding after ending the loop

    [Code moderated as per the Forum Rules. Please use the pastebin]

  11. gbaka
    Member
    Posted 3 years ago #

    wait is the function wp_paginate from a plugin?

  12. timduncan
    Member
    Posted 3 years ago #

    ah yes, sorry, it's a plugin for the pagination nav. you want to avoid plugins?

  13. gbaka
    Member
    Posted 3 years ago #

    what plugin?

  14. esmi
    Forum Moderator
    Posted 3 years ago #

  15. gbaka
    Member
    Posted 3 years ago #

    can't find the that function in that plugin hmmm

  16. gilarel
    Member
    Posted 3 years ago #

    any luck so far?
    I've been searching all over for a solution to this issue.

  17. gbaka
    Member
    Posted 2 years ago #

    figured it out

  18. yeasin33
    Member
    Posted 2 years ago #

    gbaka Please share the code. It would help me.

Topic Closed

This topic has been closed to new replies.

About this Topic