2015-04-18, 05:17:28
(2015-04-18, 01:58:21)Tyblitz Wrote: Almost there:
PHP Code:<?php if(function_exists('return_slogan') && return_slogan('Announcement')) {
// will evaluate to TRUE if Announcement's text length > 0
echo '<div>' . return_slogan('Announcement') . '</div>';
// or: echo '<div>'; get_slogan('Announcement'); echo '</div>';
}?>
The author of Slogans plugin didn't include a second $echo parameter in the get_slogan function (but that's fine, you can use return_slogan)
JFYI (& shameless self-promoting), you can also do this & more with Gs Custom Settings (although not I18n-enabled yet)
Thanks Tyblitz, that seems to work ok for me. Much appreciated and I'll certainly take a look at trying your GS Custom Settings plugin too.