Skip to content

Instantly share code, notes, and snippets.

@studiopress
Last active March 29, 2018 22:09
Show Gist options
  • Save studiopress/5570555 to your computer and use it in GitHub Desktop.
Save studiopress/5570555 to your computer and use it in GitHub Desktop.
Genesis search form.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Customize search form input box text
add_filter( 'genesis_search_text', 'sp_search_text' );
function sp_search_text( $text ) {
return esc_attr( 'Search my blog...' );
}
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Customize search form input button text
add_filter( 'genesis_search_button_text', 'sp_search_button_text' );
function sp_search_button_text( $text ) {
return esc_attr( 'Go' );
}
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Customize search form label
add_filter( 'genesis_search_form_label', 'sp_search_form_label' );
function sp_search_form_label ( $text ) {
return esc_attr( 'Custom Label' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment