Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Ok, I registered a new sidebar and have added some functionality to my theme so you can choose which sidebar to display from the back-end (using meta fields). It's working on all pages, except on a custom-page.php I created.

I've tried just about anything and can't get my head around why my selected sidebar isn't displaying on page.php (default sidebar is displaying), but not on custom-page.php. I might be overlooking something minor, but for now it's doing my head in. Any help would be greatly appreciated.

share|improve this question

2 Answers 2

Do you have the following line in your custom-page.php:

<?php get_sidebar(); ?>

?

share|improve this answer
    
I can call it directly <?php dynamic_sidebar( 'gear-sidebar' ); ?> which will display the correct sidebar next to the old one. Don't know why the "dynamic part" of calling it isn't working on this custom page, while it is on the regular pages. –  WouterB Sep 20 '11 at 12:54
up vote 0 down vote accepted

Found the solution. I forgot to add wp_reset_query(); which should always be added when using custom queries.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.