• Hey guy! Could you help me?

    Here is the code:

    [code moderated as per forum rules - please use the pastebin.
    if you post a small amount of code directly, please mark it using backticks or the code button]

    I'm using wp_pagenavi plug-in. I've created 13 posts, and I would like to show 9 posts per page, and any posts go to page_navigator...

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • you actually haven’t reported what your problem is.

    <?php
    $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 9));
    ?>

    try to add the ‘paged’ parameter to your query:

    <?php
    $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 9, 'paged' => get_query_var('paged')));
    ?>

    also (untested), the plugin might not work on a $loop query – it might need to have a $wp_query
    i.e.

    <?php
    $wp_query = new WP_Query(array('post_type' .......

    etc.

    Thread Starter LSP Sopheak

    (@lsp_sopgheak)

    OK… Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Page Navigation’ is closed to new replies.