akira7799
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: PHP Header Question/HelpThanks again. if( !is_front_page() ) worked like a charm.
Forum: Fixing WordPress
In reply to: PHP Header Question/Helpalchymyth,
Thank you kindly for your reply. The header banner worked perfectly.
I did some searching on the php.net/manual site and am learning quite a bit. However, I had one more question in regards to the array. How do you activate the is_front_page tag to work on FALSE boolean searches. That is, if the page is NOT the front_page I would like the following to return. This code works, but will apply to all pages, even the front_page, where two H2 headers would show up, and I only want one.
<h2 class="intro"> <?php $input = array("...because the little things make a difference.", "...because there’s always one more thing to do.", "...because we listen to your wishes.", "...because we can make your day perfect."); $rand_keys = array_rand($input, 2); echo $input[$rand_keys[0]] . "\n"; ?> </h2>I tried the following. It supplies a return of an empty H2 section. as if it is the front_page, when it is not:
<h2 class="intro"> <?php if( is_front_page(FALSE) ) { $input = array("...because the little things make a difference.", "...because there’s always one more thing to do.", "...because we listen to your wishes.", "...because we can make your day perfect."); $rand_keys = array_rand($input, 2); echo $input[$rand_keys[0]] . "\n"; } ?> </h2>Again, please just direct me to a place to look, because I’m not sure of the terminology for which to search.
Also, is there a php syntax checker?
Thanks,
Dave