<?php // Custom place to add the search bar echo do_shortcode('[display_search_form]'); // function.php searchbar shortcode created function shapeSpace_display_search_form() { $search_form = '<form method="get" id="search-form-alt" action="'. esc_url(home_url('/')) .'"> <input type="text" name="s" id="s" placeholder="Search.."> </form>'; return $search_form; } add_shortcode('display_search_form', 'shapeSpace_display_search_form'); ?>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter