Different Sidebar on Different Pages?
-
Hi all,
I would like the sidebar (more specifically the content inside the sidebar) on the home page to be different from the sidebar on the rest of my site. In my sidebar.php file I have the following:
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?> <?php include (TEMPLATEPATH . '/sidebar2.php'); ?>I was wondering if I can do something like
IF IS HOME:
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?> <?php include (TEMPLATEPATH . '/sidebar2.php'); ?>ELSE:
<?php include (TEMPLATEPATH . '/sidebar3.php'); ?> <?php include (TEMPLATEPATH . '/sidebar4.php'); ?>Obviously I have to create the sidebar3.php and sidebar4.php files. I don’t know PHP very well so how can I do this conditional statement and will it for the current task at hand?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Different Sidebar on Different Pages?’ is closed to new replies.