[resolved] Custom Query and Pagination (3 posts)

  1. cmsnext
    Posted 5 years ago #

    I am trying to add pagination to the results of a custom query that I have created but am not able to do so.

    $querystr = "SELECT * wp_posts......;";
    $myValue = $wpdb->get_col($querystr);
    foreach ( $myValue as $theValue ) :
    here goes coding of getting the values and echo them
    if(function_exists('wp_pagenavi')) { wp_pagenavi(); }

    using wppagenavi does not work and I understand that it will not work as it will not be getting the paged value.

    but considering the above query, how can I add pagination possibly via wp_pagenavi or any other method
    thanks in advance

  2. vtxyzzy
    Posted 5 years ago #

    See if this article can help: Pagination Using paginate_links()

  3. cmsnext
    Posted 5 years ago #


    thanks vtxyzzy

    after some trial / error and some mods made it to work

    thanks once again

Topic Closed

This topic has been closed to new replies.

About this Topic