Posts: 30
Threads: 2
Joined: Mar 2015
(2015-04-18, 01:58:21)Tyblitz Wrote: 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)
the code i was looking at at the time had a second param for get_slogan() for echo vs return, and no return_slogan() function.
Posts: 166
Threads: 7
Joined: Jan 2013
(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.
Posts: 305
Threads: 15
Joined: Mar 2014
(2015-04-18, 03:13:02)simplycrazy Wrote: (2015-04-18, 01:58:21)Tyblitz Wrote: 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)
the code i was looking at at the time had a second param for get_slogan() for echo vs return, and no return_slogan() function.
I made sure to download and check the source
.
Posts: 30
Threads: 2
Joined: Mar 2015
(2015-04-18, 07:50:37)Tyblitz Wrote: I made sure to download and check the source .
http://get-simple.info/forums/showthread...9#pid35839 is what i was looking at.
Posts: 3,491
Threads: 106
Joined: Mar 2010
FYI:
I just found that the
patch/plugin I posted (that allows using
Slogan without
I18N), is
not compatible with the
I18N Search plugin.
Posts: 166
Threads: 7
Joined: Jan 2013
2015-05-02, 19:48:21
(2015-05-02, 18:55:11)Carlos Wrote: FYI:
I just found that the patch/plugin I posted (that allows using Slogan without I18N), is not compatible with the I18N Search plugin.
Lucky for me that the site Carlos helped out with this patch/plugin doesn't use I18n Search :-)
But if a long term solution would be useful to others.
Thanks for the heads-up Carlos.