Skip to content

Instantly share code, notes, and snippets.

Created April 13, 2016 20:26
What would you like to do?
// The standard search form
$form = get_search_form( false );
// Let's add a hidden input field
$form = str_replace( '<input type="submit"', '<input type="hidden" name="post_type" value="video"><input type="submit"', $form );
// Display our modified form
echo $form;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment