Thread Starter
khails
(@khails)
/*
* 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.
-
This reply was modified 5 years, 2 months ago by
khails.
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
(@khails)
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?
I do not know. I’ve not done any research on using custom queries.