Forum | "Breaking News" bar

You must be logged in to post Login

"Breaking News" bar

UserPost

3:46 pm
December 16, 2009


Chris Ullyott

Fullerton, CA

Member

posts 66

Post edited 8:50 pm – December 16, 2009 by Chris Ullyott


Hey there, I made a bright red "breaking news" bar at http://www.dailytitan.com, which can be turned "on" and "off" in PHP at specific times. Is there a way to isolate something to the front page only? We would like the bar to only appear on the front page, and not every page. Maybe there is an if statement that asks "if this is the front page?" Any help much appreciated! Thanks, Chris

Chris Ullyott | Daily Titan, CSU Fullerton | cullyott@dailytitan.com

4:21 pm
December 16, 2009


Daniel Bachhuber

Admin

posts 102

Hey Chris,

Did you add it to the header? In either regard, you should be able to wrap it in a function called is_home() to just have it display on the home page. As an example:


if (is_home()) { show_breaking_news(); }

Hope that helps!


About the CoPress forum

Most Users Ever Online:

119


Currently Online:

9 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 107

Posts: 538

Membership:

There are 151 Members

There have been 2 Guests

There are 5 Admins

There is 1 Moderator

Top Posters:

Chris Ullyott – 66

Mo Jangda – 35

arobinsonwku – 32

laurenmichell – 21

CMLife – 16

sbressler – 15

Administrators: Daniel Bachhuber (102 Posts), William P. Davis (65 Posts), joey (39 Posts), Greg Linch (14 Posts), adam (1 Post)

Moderators: Andrew Spittle (49 Posts)