Advertisement
Guest User

Untitled

a guest
Sep 4th, 2015
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. global $post;
  2. $this_post_tags_ids = wp_get_post_tags( $post->ID, array( 'fields' => 'ids' ) );
  3.  
  4. $query = new WP_Query( array( 'tag__in' => $this_post_tag_ids ) );
  5. if ($query->have_posts()){
  6. while($query->have_posts()){
  7. $query->the_post();
  8. echo the_title('<h3><a href="'.get_the_permalink.'"/>', '</a></h3>');
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement