How to display different sidebars on each page ?
-
Hi
I have asked this before I know, but I still haven’t got it working and there are no other resources that I can find for WP.
Ok I have a client who has slight variations on the sidebar requirements for everyone of the 8 pages of the site.
I have put the following in function.php:
<?php
if ( function_exists(‘register_sidebars’) );register_sidebar(array(‘name’=>’sidebar’,));
register_sidebar(array(‘name’=>’sidebar_demolition’,));
register_sidebar(array(‘name’=>’sidebar_siteregen’,));
register_sidebar(array(‘name’=>’sidebar_currentuk’,));
register_sidebar(array(‘name’=>’sidebar_asbestos’,));
register_sidebar(array(‘name’=>’sidebar_planthire’,));
register_sidebar(array(‘name’=>’sidebar_accreditation’,));
register_sidebar(array(‘name’=>’sidebar_specialist’,));
register_sidebar(array(‘name’=>’sidebar_contact’,));?>
And I get the drop in the sidebar widget area, which is nice.
however how do I connect the pages to the individual pages ?
I have tried <?php get_sidebar(2); ?> but this doesn’t do it.
So would something like <?php get_sidebar(‘demolition’); ?> work ? or is that too simple?
Really need some guidance on this one.
It would be great if someone actually took the time to point me in the right direction.
Thanks
C
- The topic ‘How to display different sidebars on each page ?’ is closed to new replies.