Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if(have_posts()): while(have_posts()): the_post(); ?>
- // show the single post and get the category of post
- <?php endwhile;endif; ?>
- if(isset($cats_arr) && !empty($cats_arr)){
- $args = array(
- 'category__in' => $cats_arr,
- 'posts_per_page'=>3,
- 'post__not_in' => array( $post->ID ) );
- $the_query= new wp_query($args);
- if($the_query->have_posts()): while($the_query->have_posts()):
- $the_query->the_post(); ?>
- //// shoe same category post title and image
- <?php endwhile;endif ?>
- <?php comments_template(); ?>
Add Comment
Please, Sign In to add comment