a simple if statement, but I am no php writer at all
-
OK so I simply want it to use the first template path if the post is by a certain author and the other template path if it is by another author. This is the mess I came up with.
<?php get_header(); ?> <?php if ('author=3'): ?> <?php include (TEMPLATEPATH . '/nitSingle.php'); ?> <?php else : ?> <?php include (TEMPLATEPATH . '/patSingle.php'); ?> <?php endif; ?> <?php get_footer(); ?>
How can I make this work? Or can this even work? This is my single.php file I was wanting to do 2 different single post files so one would load with one author and the other with the second author.
- The topic ‘a simple if statement, but I am no php writer at all’ is closed to new replies.