Created
January 10, 2015 20:22
-
-
Save gspice/bbd07123d2b5110bd5af to your computer and use it in GitHub Desktop.
wap search bar to appear only on the home page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add search widget below header. | |
add_action( 'genesis_after_header', 'wap_search_bar' ); | |
function wap_search_bar() { | |
// bail if we're not on the front page | |
if ! is_front_page() { | |
return; | |
} | |
genesis_widget_area( 'search-bar', array( | |
'before'=> '<div class="search-bar"><div class="wrap">', | |
'after' => '</div></div>', | |
) ); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment