Support » Theme: Quark » Adding Search Functionality

  • Resolved 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


    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( '/' ); ?>">
    		<span class="screen-reader-text">Search for:</span>
    		<input type="search" class="search-field" placeholder="Search …" value="" name="s" title="Search for:" />
    	<input type="submit" class="search-submit" value="Search" />

    You can read more about this on the WordPress Codex.

    Thanks, Anthony – much appreciated.

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