Sidebar Help
-
Hi, I’m trying to have a certain sidebar on a page name “Web Coding”, so in the sidebar.php file I wrote:
<div id="extras">
<?php
$name = wp_title();
if($name == "? Web Coding"){
dynamic_sidebar('Programming Sidebar');
}else{
dynamic_sidebar('Right Sidebar');
}
?>
</div>
However this isn’t working, probably because I’m not very good at PHP!
What happens is that of course even on the page entitled “Web Coding”, the ‘Right Sidebar’ is shown and for some reason the name of the page is echoed, or rather wp_title() is executed.
If anyone could help I would be very greatful!!
– Jake
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Sidebar Help’ is closed to new replies.