WordPress Code - Exclude categories on pages

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vbcruiser
Forum Newbie
Posts: 1
Joined: Wed Nov 05, 2008 10:54 am

WordPress Code - Exclude categories on pages

Post by vbcruiser »

I am not grasping the concept of conditional tags and would like some help. I want to exclude categories in the sub nav bar on different pages. I have this code, but don't understand what needs to happen. Can anyone step me thru this?

Code: Select all

<?php
 
if    (is_page('1')) {
 
     echo 'NAVBAR 1 CODE';
 
} else {
 
     echo 'NAVBAR 2 CODE';
 
}
 
?>
Post Reply