• Resolved TrekRight

    (@trekright)


    Hi Everyone,

    Any recommendations on the best way to add search functionality to my site without using widgets? I don’t think there is a shortcode available (by default).

    Is adding a shortcode via PHP the best approach? (easy enough to do, but then I either need to set up a child theme or lose the ability to update Quark).

    Or is there a particular plugin that works well with Quark?

    Other options?

    Thanks in advance for any help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author Anthony Hortin

    (@ahortin)

    You can add a search form using the following php. Simply add it to wherever you’d like it displayed, such as the sidebar.

    <?php get_search_form(); ?>

    Using the above php, Quark will render the WordPress built-in search form. If you want to customise it, simply create a searchform.php file and add something like the following…

    <form role="search" method="get" class="search-form" action="<?php echo home_url( '/' ); ?>">
    	<label>
    		<span class="screen-reader-text">Search for:</span>
    		<input type="search" class="search-field" placeholder="Search …" value="" name="s" title="Search for:" />
    	</label>
    	<input type="submit" class="search-submit" value="Search" />
    </form>

    You can read more about this on the WordPress Codex.

    Thread Starter TrekRight

    (@trekright)

    Thanks, Anthony – much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding Search Functionality’ is closed to new replies.