Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $cats = wp_get_post_categories($post->ID, array(
- 'fields' => 'ids'
- ));
- $posts = new WP_Query(array(
- 'category' => $cats
- ));
- while($posts->have_posts()) {
- $posts->the_post();
- // itd...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement