title: Wordpress, if function returns "nothing"
body: <p>I am building a wordpress theme I want to have the next and previous DIV only appear IF their is a next and previous button available. </p>
  
  <p>If there is 10 posts and the display limit is 10 posts I don't want an empty div. However when there are 20 posts and the display limit is 10 I want the next and previous buttons to show in there own div.</p>
  
  <p>I got this far and realized that posts_nav_link() doesn't return null.</p>
  
  <pre><code>function next_previous_div(){
  print '&lt;!-- ';
  $output = posts_nav_link();
  print " --&gt;\n";
  if ($output != null) 
      {   
          echo '&lt;div class="float post" style="text-align:center"&gt;';
          echo posts_nav_link();
          echo '&lt;/div&gt;&lt;!-- end post--&gt;';
      };
  };
  </code></pre>