Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Slogan plugin
#19
(2015-04-14, 20:21:49)davetest Wrote: I would like to use this plugin to put announcements into my template in a way where the html div etc that I surrounds the slogan does not display if the slogan is empty. But I'll still want to keep the particular slogan existing in the backend ready for an announcement and be able to just save it as an empty field when there isn't an announcement. So I'm not looking to detect if a slogan exists (though it would be nice to know how to do that too) I'm looking to find what php code would only display the whole div (etc) containing the slogan if it has content (or maybe contains more than x characters?).
Any ideas please?

What I'm trying to do is use in my template:
PHP Code:
<div><?php get_slogan('Announcement');?></div> 
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.
Can any php expert point me in the right direction?
Reply


Messages In This Thread
Slogan plugin - by Zorato - 2012-09-13, 06:40:25
RE: Slogan plugin - by tazmandev - 2013-04-01, 12:58:03
RE: Slogan plugin - by Zorato - 2013-04-02, 00:28:03
RE: Slogan plugin - by Zorato - 2013-04-27, 08:34:29
RE: Slogan plugin - by tazmandev - 2013-04-28, 09:34:11
RE: Slogan plugin - by Timbow - 2014-05-03, 08:11:02
RE: Slogan plugin - by davetest - 2015-03-24, 20:51:33
RE: Slogan plugin - by Zorato - 2015-03-25, 01:29:53
RE: Slogan plugin - by davetest - 2015-03-25, 01:58:25
RE: Slogan plugin - by Carlos - 2015-03-25, 03:42:28
RE: Slogan plugin - by davetest - 2015-03-25, 07:19:10
RE: Slogan plugin - by shawn_a - 2015-03-25, 10:27:58
RE: Slogan plugin - by Carlos - 2015-03-26, 05:25:21
RE: Slogan plugin - by shawn_a - 2015-03-26, 06:44:09
RE: Slogan plugin - by davetest - 2015-04-14, 20:21:49
RE: Slogan plugin - by davetest - 2015-04-16, 07:06:26
RE: Slogan plugin - by simplycrazy - 2015-04-16, 10:41:05
RE: Slogan plugin - by davetest - 2015-04-16, 17:54:37
RE: Slogan plugin - by simplycrazy - 2015-04-16, 18:08:43
RE: Slogan plugin - by Tyblitz - 2015-04-18, 01:58:21
RE: Slogan plugin - by simplycrazy - 2015-04-18, 03:13:02
RE: Slogan plugin - by Tyblitz - 2015-04-18, 07:50:37
RE: Slogan plugin - by simplycrazy - 2015-04-18, 11:48:10
RE: Slogan plugin - by davetest - 2015-04-18, 05:17:28
RE: Slogan plugin - by Timbow - 2015-04-16, 08:05:14
RE: Slogan plugin - by Carlos - 2015-04-17, 00:19:37
RE: Slogan plugin - by Carlos - 2015-05-02, 18:55:11
RE: Slogan plugin - by davetest - 2015-05-02, 19:48:21
Slogan plugin - by mvlcek - 2012-09-20, 16:11:54



Users browsing this thread: 1 Guest(s)