Re: Question on conditional statement
- From: rbaulbin@xxxxxxxxxxx
- Date: Fri, 28 Nov 2008 09:30:48 -0800 (PST)
On Nov 26, 11:26 pm, trookat <troo...@xxxxxxxxxxxxx> wrote:
rbaul...@xxxxxxxxxxx wrote:
Hello -
If anyone could field the following question, I'd greatly appreciate
it:
This seems to be a simple question, but for some reason it's not
working in the code I'm working with...
I'm very new to PHP...
I'd like to simply test whether or not the current web page is the
home page, and then execute one line of code, such as <div
class=class1>; if not, execute <div class=class2>. I've tried various
incarnations of is_home(), but the page displays nothing. Can anyone
shoot me some code that will work? :)
Thanks,
RB
is_home is not in the php manual so i am assuming its a custom made
function
googling shows results for wordpress mainly for templating.
from a quick look its used like this
<?php
if (is_home() {
CODE FOR CALLING YOUR STYLE***} else {
CODE FOR CALLING YOUR OTHER STYLE***}
?>
I don't have any real knowledge on wordpress. I suggest googling or
checking wordpress website for template info.
If you are NOT using wordpress please post your code and we can
suggestions from there.
regards trookat
Thank you and everyone else for responding... Paul's code is what I
was looking for.
.
- References:
- Question on conditional statement
- From: rbaulbin
- Re: Question on conditional statement
- From: trookat
- Question on conditional statement
- Prev by Date: Re: Question on conditional statement
- Next by Date: Re: MySQL -> PHP -> MS Excel?
- Previous by thread: Re: Question on conditional statement
- Next by thread: Re: Question on conditional statement
- Index(es):