I've created a custom taxonomy => cat-blog
in my custom post => blog
, cat-blog
have 4 terms
and each terms
have list of post belong to that term
Example of terms:
- City Updates (4 post belong
)
- Home Tips (6 post belong
)
- Real Estate Guide (8 post belong
)
- Real Estate Industry (9 post belong
)
and using this query
<?php
$query = new WP_Query(array('posts_per_page' => 2, 'post_type' => 'blog', 'blog-cat' => get_the_term_list( $post->ID, 'blog-cat' )));
while ($query->have_posts()) : $query->the_post();
?>
<?php
// content here
?>
<?php endwhile; ?>
<?php wp_reset_query(); ?>
<?php
?>
to display 2 post in same category,
AND I just want to put next
and prev
pagination, so I can navigate the rest of the post, belong to that term
.