Take the 2-minute tour ×  For my related posts I have set up a
scrollable container. I need the HTML to be outside of the loop
or otherwise the layout will be a mess if there are no related
posts to display (missing divs that are inside the loop only if
there are related posts to be shown).  So, the only option I
have is to display a message within the container that only
shows up if there are no related posts to display. Something
like: "sorry but there are no related posts for this entry"
Unfortunately I'm not sure how to modify the code / how to
implement it into the current code:  <h2>Related Posts</h2>
<!-- "previous page" action -->  <!-- root element for
scrollable --> <div class="scrollable" id=chained>        <!--
root element for the items -->     <div class="items">    $tags
= wp_get_post_tags($post->ID);  if ($tags) {      $tag_ids =
array();  'tag__in' => $tag_ids, 'showposts'=>12, // get all the
posts at once, then split them up afterwards.
'ignore_sticky_posts' => 1  $po