Title: Set up the query
Last modified: March 2, 2021

---

# Set up the query

 *  [Dan Stramer](https://wordpress.org/support/users/danstramer/)
 * (@danstramer)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/set-up-the-query/)
 * Hi
    Is there an option within the plugin’s settings to set up a query like this:
 *     ```
       global $post;
       $current_category = get_the_category();
   
       $same_category = new WP_Query(array(
           'cat'            => $current_category[0]->cat_ID,
           'post__not_in'   => array($post->ID),
           'orderby'        => 'rand',
           'posts_per_page' => 15
       ));
       ```
   
 * Thanks
    Dan

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [Elvin](https://wordpress.org/support/users/ejcabquina/)
 * (@ejcabquina)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/set-up-the-query/#post-14125590)
 * Hi there,
 * With the most recent update (1.2.0), you can filter the query args through the`
   wpsp_query_args` filter.
 * Here’s an example.
    [https://wpshowposts.com/support/topic/show-posts-from-a-category-and-a-tag-2/#post-26833](https://wpshowposts.com/support/topic/show-posts-from-a-category-and-a-tag-2/#post-26833)
 * You can modify it to your preference.
 *  Thread Starter [Dan Stramer](https://wordpress.org/support/users/danstramer/)
 * (@danstramer)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/set-up-the-query/#post-14130467)
 * Thanks,
    When will version 1.2 be available?
 *  Plugin Support [Elvin](https://wordpress.org/support/users/ejcabquina/)
 * (@ejcabquina)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/set-up-the-query/#post-14131116)
 * An alpha version has actually been around for quite some time found here:
    [https://wpshowposts.com/wp-show-posts-1-2-0/](https://wpshowposts.com/wp-show-posts-1-2-0/)
 * But we don’t recommend using it on live sites yet.
 * A beta version is planned for release next week. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Set up the query’ is closed to new replies.

 * ![](https://ps.w.org/wp-show-posts/assets/icon-256x256.png?rev=2846296)
 * [WP Show Posts](https://wordpress.org/plugins/wp-show-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-show-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-show-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-show-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-show-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-show-posts/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Elvin](https://wordpress.org/support/users/ejcabquina/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/set-up-the-query/#post-14131116)
 * Status: not resolved