Google to search only within your site using jQuery & Bootstrap

Google to search only within your site using jQuery & Bootstrap

Google to search only within your site using jQuery & Bootstrap:

We have lot of plugins to make google to search only within your site in CMS frameworks like wordpress, joomla etc. But when you are developing your own custom site then enabling google to search only within your site may need some coding part.
In this post I am explaining you how to make google to search only within your site.

Requirements:

jQuery & Bootstrap JS files [you will get it when you download this project]
Bootstrap CSS
demo
download

Steps:

Along with your search box, add the hidden field with “sitesearch” as name and value as your site address.

<div class="col-lg-12 col-md-12 col-xs-12">
<h3 class="bg-primary center"> Enter any search term [java, php, jquery, css] (searches only in ngdeveloper.com)</h3>
<form action="http://www.google.co.in/search" method="get" target="_blank">
<input type="text" class="form-control" name="as_q">
<input type="hidden" name="sitesearch" class="form-control" value="ngdeveloper.com">
<span class="input-group-btn">
</span>
</form></div>

Things to Note:

Download this project by clicking the download button above, which has all the files, dependent JS & CSS.
Feel free to write your comments in the below section.

Leave a Reply