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.
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.
I got this far and realized that posts_nav_link() doesn't return null.
function next_previous_div(){
print '<!-- ';
$output = posts_nav_link();
print " -->\n";
if ($output != null)
{
echo '<div class="float post" style="text-align:center">';
echo posts_nav_link();
echo '</div><!-- end post-->';
};
};