if else help? would like to display different widget areas
-
Am using WP as a CMS and having trouble getting an if else statement to work properly. I am using a page template that contains a column in which I would like to change the widget area that displays depending on which page is being displayed. I still want all the pages to use the same template still. Was thinking that I could use $is_page or something with the slug to determine which page I am on and then put the various widget areas within that spot but have not had any luck as of yet. I am not much of a programmer. Basically this is what I am working from…
<?php if ($is_page==(page-name)) echo "show widget area 1"; else echo "show widget area 2"; ?>
I can get the text ‘show widget area 1’ to show up but when I change pages it just stays there. I don’t get it and I obviously have something wrong.
Any help that can be provided is much appreciated. Thanks for the time!
- The topic ‘if else help? would like to display different widget areas’ is closed to new replies.