Show Custom Taxonomy as Headline for related posts
The easiest way to approach this given the code you have provided is to reverse the order of your code. Do the foreach before the title, and instead of outputting the post content using echo, append to a variable. Then check if the variable has anything to output and if so, output the title. $post … Read more