The creation of custom query paging in WordPress is one of the paging solutions after sorting blog posts and custom post types. If you want to create a custom query page in your wordpress blog, this post will provide guidance. Ideally, custom query pagination involves using other query parameters to create pagination of word press posts based on the query. In the previous tutorial, we explained in detail how to add digital pagination in word press, how to create thumbnails of the previous page and the next page, and how to use pagination to divide a post into multiple pages. We also share several word press pagination codes that can be used to add blog preferred pagination options. This post describes how to build and implement custom query paging on the WordPress site.
As mentioned in the introduction of \
The following is an example of a custom page template with a custom query code: Male 2, \/ \/ search the past 5 posts
Pagination = > $page
);
$customquery = new wp_query ($args); This code generates a custom page template that can be viewed under page properties, as shown below:
The query may have multiple arguments, but in this case, only the number of posts_per_page to be displayed on the page is limited. You can also use post_type \
$current_author = ( isset($_GET ) ) ? get_user_by(“slug”,$author_name):get_userdata(intval($author));
\/*Set the arguments of the query
$args = array(
\
\
\
‘posts_per_page’ => 10,
\
Author = > \
);
\/\/Query instantiation
$query = new wp_query ($args)$ After building args and instantiating the query, you can display the post in the loop and prepare to add a custom query in the next step.
The queried posts are displayed in the custom page template. The queried posts are displayed. The code has been added to the original custom template code. The complete code is as follows: Male 2, \/ \/ search the past 5 posts
Pagination = > $page
);
$customquery = new wp_query ($args);
?>


have_posts() ):
Period ($customquery – > have_pos)
ts()) :
$customQuery->the_post();
Global $post;
?>
<a href="\
max_num_pages;
If (! $page)
{
$page=1;
}
}
If (1! = $page)
{
Echo \
if($paged > 2 && $paged > $range+1 && $showitems « First
\
If ($paged > 1 & $showitems androg & lsaquo; Li Qian androg);
($i=1; $i
= $paged+$range+1 || $i
\
}
}
if ($paged
i class=’flaticon flaticon-back’>

}
?>