Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Kapil Chugh

    (@kapilchugh)

    Replace showposts with posts_per_page.

    Hey! Is not working with posts_per_page, it shows only 10 posts:

    My query:
    query_posts("posts_per_page=-1&section_name=Name")

    I have the same problem.
    Anyone have some idea??

    Plugin Author Kapil Chugh

    (@kapilchugh)

    I’m extremly sorry for late reply.

    It is a bug.
    For now, replace one function from includes/functions.php file with this one

    function mpo_change_limit( $limit ) {
        global $paged, $myOffset, $wp_query;
        $section_name = isset($wp_query->query_vars['section_name']) ? $wp_query->query_vars['section_name'] : '';
        if ($section_name != '' ) {
          if (empty($paged)) {
            $paged = 1;
          }
          $postperpage = isset($wp_query->query_vars['posts_per_page']) ? $wp_query->query_vars['posts_per_page'] : intval(get_option('posts_per_page'));
          $pgstrt = ((intval($paged) -1) * $postperpage) + $myOffset . ', ';
          $limit = 'LIMIT ' . $pgstrt . $postperpage;
        }
        return $limit;
      }

    Hi, it seems like you forgot to add this fix in the plugin, you should probably also add this too in your next update:
    $paged = isset($wp_query->query_vars['paged']) ? $wp_query->query_vars['paged'] : $paged;

    So when paged is specified in the query, it’s used instead of the global paged.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: My Post Order] Only shows a max of 10 posts in the loop’ is closed to new replies.