identifying search results page
-
I have two sidebars – one is default and the other is called on certain pages, to replace the default. This is done in sidebar.php
Specifically:
<?php if ( is_active_sidebar( 'sidebar-1' ) && ! is_page_template( 'page_writings-template.php' ) ) : ?> <aside id="secondary" class="sidebar widget-area" role="complementary"> <?php dynamic_sidebar( 'sidebar-1' ); ?> </aside><!-- .sidebar .widget-area --> <?php endif; ?> <?php if ( is_active_sidebar( 'sidebar-4' ) && is_page_template( 'page_writings-template.php' ) ) : ?> <aside id="writings" class="sidebar widget-area" role="complementary"> <?php dynamic_sidebar( 'sidebar-4' ); ?> </aside><!-- .sidebar .widget-area --> <?php endif; ?>
Now I need the second (non-default) sidebar to show up on the search results page, but I have no idea how to do it. Adding
|| is_search()
to the second block does not work and now I’m out of ideas. lolGoogling only gets me a bunch of ‘how to configure your search page’ or ‘how to make your site show up in Google searches’.
Please help?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘identifying search results page’ is closed to new replies.