mcbest
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Menu works on static pages but not 'Posts page'Resolved!
Just discovered I should be using is_home for the posts page rather than is_page.
Great!
McBest
Forum: Themes and Templates
In reply to: Multiple IF conditionsGot it working. Think I had some page naming issues and the is_home tag didn’t work.
The working code is:
<ul<?php
if ( is_page( ‘Home’ ) ) :
echo ‘ class=”bphome”‘;elseif ( is_page( ‘About’ ) ) :
echo ‘ class=”about”‘;elseif ( is_page( ‘News’ ) ) :
echo ‘ class=”news”‘;elseif ( is_page( ‘Contact’ ) ) :
echo ‘ class=”contact”‘;endif;
?>>
Forum: Themes and Templates
In reply to: Multiple IF conditionsChanged the else if to elseif and this stops the error but the echo isn’t writing to the page:
<ul<?php
if ( is_home() ) :
echo ‘ class=”bphome”‘;elseif ( is_page( ‘about’ ) ) :
echo ‘ class=”about”‘;elseif ( is_page( ‘news’ ) ) :
echo ‘ class=”news”‘;endif;
?>>
Forum: Themes and Templates
In reply to: Multiple IF conditionsIt gave an error:
Parse error: syntax error, unexpected T_IF, expecting ‘:’ in /header.php on line 86
Forum: Themes and Templates
In reply to: Multiple IF conditionsThank you very much for replying. I will try it out and do some reading!
Forum: Fixing WordPress
In reply to: Can’t seem to call files from index.phpCan anyone shed any light on my problem?
Thanks in advance!
Jeff
Forum: Fixing WordPress
In reply to: Can’t seem to call files from index.phpHi Esmi,
Thanks for replying. The code is not being rendered at all when I place the call within the index.php but it is rendered when I place the call within sidebar.php.
What are the rules concerning the placement of <?php get_sidebar(‘left’);?>? I thought it could go anywhere within the <body></body>.
Thanks,
Jeff
Forum: Fixing WordPress
In reply to: Can’t seem to call files from index.phpPlease don’t tell me this is one of my only-ever-happens-to-me problems!!!
Jeff