2015-04-16, 17:54:37
(2015-04-16, 10:41:05)simplycrazy Wrote:Thanks for your input simplycrazy, but sadly all that goes is display the snippet content under all conditions and never displays the divs :-((2015-04-16, 07:06:26)davetest Wrote: What I'm trying to do is use in my template:
But I need a php solution so that if the slogan has no content, the div tags will also not display. That way I don't get to apply any of the css attached to the div.PHP Code:<div><?php get_slogan('Announcement');?></div>
Can any php expert point me in the right direction?
hardly an 'expert' here, lol, but something like this, perhaps?
PHP Code:<?php if(function_exists('get_slogan') && get_slogan('Announcement')) {
echo '<div>' . get_slogan('Announcement') . '</div>';
}?>