Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created Apr 13, 2016
Embed
What would you like to do?
<?php
// 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