I am trying to completely hide a <div> that contains my downloads when there are no downloads.
In my <div> I only show downloads with certain tags like this:
$dl = '[downloads query="tags=blue,big"]';
$dl = apply_filters('the_content', $dl);
echo $dl;
So, to hide this <div> when there are no matching downloads I thought I'd use something like this:
$check_dl = get_downloads('query="tags=blue,big"'');
if ( '' != $check_dl ) {
$dl = '[downloads query="tags=blue,big"]';
$dl = apply_filters('the_content', $dl);
echo $dl;
}
Unfortunately, that does not work. Any ideas?