try a diff name for ‘page-header’.
OK, thanks – but it was working even with that name (but I guess that is a bad idea for a name), I just don’t want it to show up on the homepage. I need to add something like: if ( !is_home() ) somewhere, just not sure where to add it.
so if I change the name of the sidebar to topbar – where can I add my conditional statement to get it to not appear on the home page.
<?php /* Widgetized sidebar */
if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('topbar') ) : ?><?php endif; ?>
Thanks!
Above is not a full Page Template, please use Pastebin or if short (less than a 1000000000000000000 lines – kidding! less than 10?) post your full Page Template.
Unfortunately, I don’t have the full page template. I’m using Genesis framework to build my theme, so I’m just adding a “simple hook” through the wp dashboard so I can add an additional sidebar to every page except the homepage. The statement above is a good start as does what I want it to do (adds a sidebar), except I’m trying to figure out how to exclude it from the homepage.
So basically I’m just looking for a conditional statement that says the following:
• add sidebar (named topbar) unless you are on the homepage
Does that help!?
Thanks for your help either way!
EXCLUDES this particular sidebar from the homepage
try using a conditional tag http://codex.wordpress.org/Conditional_Tags
either is_home()
or is_front_page()
:
example to replace your code (untested):
<?php /* Widgetized sidebar */
if ( !is_home() ) dynamic_sidebar('topbar'); ?>
for specifics, please contact the theme’s developer.
That works perfectly – thanks so much!