WordPress.org

Support

Support » Plugins and Hacks » Q2W3 Post Order » [Resolved] [Plugin: Q2W3 Post Order] get_posts doesn't works correctly.

[Resolved] [Plugin: Q2W3 Post Order] get_posts doesn't works correctly.

  • 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?

    http://wordpress.org/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 ‘[Resolved] [Plugin: Q2W3 Post Order] get_posts doesn't works correctly.’ is closed to new replies.
Skip to toolbar