Last active
November 20, 2018 06:02
-
-
Save masumskaib396/9786255eee8449bf88ecd7eb6fc23116 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$post_in = array(101,98,1); | |
$paged = get_query_var('paged')? get_query_var('paged') : 1; | |
$post_par_page = 1; | |
$_p = new WP_Query( array( | |
'post__in' => $post_in, | |
'orderby' => 'post__in', | |
'post_type'=> 'post', | |
'posts_per_page' => $post_par_page, | |
'paged' => $paged, | |
) ); | |
while ($_p->have_posts()) { | |
$_p->the_post(); | |
?> | |
<!-- content --> | |
<h2></h2> | |
<p></p> | |
<img src="" alt=""> | |
<?php | |
} | |
wp_reset_query() | |
?> | |
<!-- paginate links --> | |
<?php | |
echo paginate_links( array( | |
'total' => $_p->max_num_pages, | |
'current' => $paged, | |
'prev_next' => false, | |
) ) | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment