Viewing 1 replies (of 1 total)
  • Just faced with the same question.
    Quick searching over internet showed there’s no known solution (at least that I could find).
    I looked into the plugin and was able to tune it to show the pagination.
    I think I will leave the solution here just in case someone will be searching for the same in the future (unless the plugin is upgraded to embed the solution).
    NB: The solution requires basic knowledge of PHP and WordPress architecture, since it includes plugin source code adjustment.
    NB2: The solution describes an unconditional pagination inclusion. If you need to be able to switch pagination on / off, elaborate the solution further.

    there are two steps required to achieve the goal:
    a) adjust WP variables to turn standard pagination workflow on
    b) adjust page template to display pagination

    Ok now, here are the modifications (based on plugin version 4.9.3)
    1) in file inc/core/shortcodes.php, in function posts(), add the following line
    $GLOBALS[‘wp_query’] = $posts;
    after the initialization of the $posts variable ($posts = new WP_Query( $args ))
    this will setup WP global variable wp_query used in standard pagination generation functions.
    2) same function, add
    wp_reset_query();
    line before this call: wp_reset_postdata()
    this will reset the above modification after the pagination is printed
    3) same function, find the $atts array initialization in the very beginning and ‘paged’ argument to the initialization array:
    ‘paged’ => get_query_var(‘paged’) ? get_query_var(‘paged’) : 1
    this will tell the query current page index to display
    4) add pagination output to the templates/default-loop.php file (or the other template you are using). You can use standard WP functions for that (function posts_nav_link(), I added it to the end of the template).

    Hope this wasn’t too complicated ??

Viewing 1 replies (of 1 total)
  • The topic ‘Pagination’ is closed to new replies.