Wordpress Simple IF/ELSE

SpectroMX5

Junior Member
Joined
Feb 8, 2008
Messages
158
Reaction score
210
[SOLVED]

It's not outputting anything at all. My divs are empty inside like Dr. Evil.

Code:
<div id=logo">
<?php if ( is_page_template('template-java.php') ):?>
	<img src="<?php get_template_directory_uri(); ?>/images/java-logo.jpg" alt="Doghouse Java Hut" />

<?php elseif ( is_page_template('template-doghouse.php') || is_page_template('template-catering.php') ):?>
	<img src="<?php get_template_directory_uri(); ?>/images/doghouse-logo.jpg" alt="Doghouse Diner" />

<?php endif; ?>
</div>

I know this isn't the services offered section but if you get me on skype I'd like to hire someone for some PHP work. Skype handle: spectromx5
 
Last edited:
The syntax looks correct. Are you sure that one of the cases you are testing for is true? You might try putting a final catchall else at the bottom before your last 2 lines and see if it shows up.

Code:
...
<?php else: ?>
  put something here to see if neither if statement is true
<?php endif; ?>
</div>
 
Back
Top