Title: Post Type Custom WP_Query
Last modified: March 18, 2021

---

# Post Type Custom WP_Query

 *  [khails](https://wordpress.org/support/users/khails/)
 * (@khails)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/post-type-custom-wp_query/)
 * Hello,
    I Interested to buy WP-Paginate Pro Plugin does this plugin work with
   Post type or costom Wp Query //Example WP_Query $mycustom_query = new WP_Query(
   $args );
 * I wass try in free version not work for custom query
 * <?php
    $GLOBALS[‘wp_query’]->max_num_pages = $mycustom_query->max_num_pages; 
   wp_pagenate(); ?>

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

 *  Thread Starter [khails](https://wordpress.org/support/users/khails/)
 * (@khails)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/post-type-custom-wp_query/#post-14200032)
 *     ```
       /* 
        * My Custom Query
        */
   
       $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; 
       $args = array(
         'post_type' => array('post'), 
         'post_status' => 'publish', 
         'order' => 'DESC', 
         'orderby' => 'date', 
         'posts_per_page' => 1, 
         'paged' => $paged, 
       );
   
       // WP_Query
       $mycustom_query = new WP_Query( $args );
       ?>
       ```
   
 * This Not Work
 * //not work for custom query
    <?php wp_paginate( array( ‘query’ => $mycustom_query));?
   >
 * <?php
    $GLOBALS[‘wp_query’]->max_num_pages = $mycustom_query->max_num_pages; 
   wp_paginate( array( ‘query’ => $mycustom_query )); ?>
    -  This reply was modified 5 years, 2 months ago by [khails](https://wordpress.org/support/users/khails/).
    -  This reply was modified 5 years, 2 months ago by [khails](https://wordpress.org/support/users/khails/).
 *  Plugin Author [AlanP57](https://wordpress.org/support/users/alanp57/)
 * (@alanp57)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/post-type-custom-wp_query/#post-14200055)
 * No, if the free versions does not work with this code then the Pro would not 
   be any different. Normally I would start with a blog index page that works with
   WP Paginate and then make modifications to the query. There are different ways
   to go about modifying the WordPress loop. Some may work better than others.
 *  Thread Starter [khails](https://wordpress.org/support/users/khails/)
 * (@khails)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/post-type-custom-wp_query/#post-14200116)
 * The code above works fine in most other paginations like WP-Pagenavi. I want 
   this to work in this plugin too. or is there any other code to integrate with
   custom queries?
 *  Plugin Author [AlanP57](https://wordpress.org/support/users/alanp57/)
 * (@alanp57)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/post-type-custom-wp_query/#post-14200183)
 * I do not know. I’ve not done any research on using custom queries.

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

The topic ‘Post Type Custom WP_Query’ is closed to new replies.

 * ![](https://ps.w.org/wp-paginate/assets/icon-128x128.png?rev=1566512)
 * [WP-Paginate](https://wordpress.org/plugins/wp-paginate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-paginate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-paginate/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-paginate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-paginate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-paginate/reviews/)

## Tags

 * [custom queries](https://wordpress.org/support/topic-tag/custom-queries/)

 * 4 replies
 * 2 participants
 * Last reply from: [AlanP57](https://wordpress.org/support/users/alanp57/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/post-type-custom-wp_query/#post-14200183)
 * Status: not resolved