Created a very simple plugin to display a custom search form. No errors, but not performing search. I may be over my head and leaving out one or many requirements.
My plugin code:
/**
* Begin Shortcode.
*/
function divilicious_micro_search($atts, $content = null) {
extract(shortcode_atts(array('color' => 'teal'), $atts));
return '<div id="dlms">
<form role="search" method="get" action="' . home_url( '/' ) . '" class="dlms">
<input type="search" class="dlms-search-input" placeholder="'.esc_attr__('Search...','dlms').'" value="'.get_search_query().'" name="s" title="Search for:" >
'.get_search_query().'
<button style="background:'.$color.'" type="submit">
<span class="fontawesome-search"></span>
</button>
</form>
</div>';
}
add_shortcode('dl-micro-search', 'divilicious_micro_search');
Am I missing something that will give me a fighting chance or shall I give up?
{}
sign above the editor. Or simply indent each line with 4 spaces. This will all display your code in a code block