• Resolved peco

    (@peco)


    This plugin works fine in archive.php but doesn’t work correctly when I use get_posts function in other template.

    For example, when I wrote the following codes in index.php, post order will be the default order.

    $args = array(
                  'post_type' => 'post',
                  'posts_per_page' => '10',
                  'category' => '5'
                  );
    get_posts($args);

    Is there any way to use code like ‘orderby=q2w3-post-order’ in this plugin?

    https://www.ads-software.com/extend/plugins/q2w3-post-order/

Viewing 1 replies (of 1 total)
  • Plugin Author Max Bond

    (@max-bond)

    Hello!

    This is not a bug. Set parameter ‘suppress_filters’ => false when using get_posts() or use query_posts() function (better).

    get_posts uses ‘suppress_filters’ => true as default, while query_posts() applies filters by default

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Q2W3 Post Order] get_posts doesn't works correctly.’ is closed to new replies.