I want to display a dynamic sidebar on all pages, and a different sidebar on the homepage. There are also particular pages where I don't want to display either of them.
This code is not hiding the unwanted sidebar off of the Homepage; both sidebars show. How can I hide 'multipackage' from the homepage and only display 'singlepackage'? (I guess I thought that the elseif would take care of that. I have also tried just 'else' but I get a syntax error).
<?php
if(!function_exists('dynamic_sidebar')
|| !dynamic_sidebar('multipackage'));
elseif (is_page_template('page-homepage.php')) {
dynamic_sidebar('singlepackage');
// also need to hide both sidebars from Page IDs 4 and 5
}
?>
FWIW I have read up on the codex http://codex.wordpress.org/Function_Reference/dynamic_sidebar , this site, and other resources such as http://dreamwhisperdesigns.com/genesis-tutorials/load-sidebar-specific-pages/ (I am not an experienced php developer and syntax is where I often fail, if that's not already obvious!)
I would really like to avoid using a plugin for this. Thanks everyone in advance.
