Jump to content
zdarkmind94

search wordpress

Recommended Posts

Hello ,how can I include functionality for wordpress search on this static Markup:

  <div class="medium-4 columns sidebar">        <div class="row search">          <div class="small-12 columns">            <div class="row collapse">              <div class="small-8 columns">                <input type="text" placeholder="Cauta">              </div>              <div class="small-2 columns end">                <a href="#" class="button postfix search_button"><i class="fa fa-search fa-lg"></i></a>              </div>            </div>          </div>        </div>

Share this post


Link to post
Share on other sites

Searching is dynamic, not static. A text field and link isn't a search engine, it's just a form (ideally, that link would be an actual submit button inside a form as well). The text field also needs a name or ID. If that link is supposed to search then I assume that they use Javascript to add a click handler to the link to submit the text to the server for searching.

Share this post


Link to post
Share on other sites
<div class="row search">          <div class="small-12 columns">            <div class="row collapse">                <form action="<?php echo home_url( '/' ); ?>" method="get">                    <div class="small-8 columns field">                        <input type="text" id="search" placeholder="Cauta" name="s" value="<?php the_search_query(); ?>" />                     </div>                     <div class="small-2 end columns ">                         <button type="submit" id="search-button" class="postfix button"><i class="fa fa-search fa-lg"></i>                         </button>                     </div>                </form>            </div>          </div>    </div>

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...