Wednesday, May 4, 2011

Hongkiat.com: 50 More Breathtaking 3d Street Art (paintings)

Hongkiat.com: 50 More Breathtaking 3d Street Art (paintings)


50 More Breathtaking 3d Street Art (paintings)

Posted: 04 May 2011 06:58 AM PDT

3d Street Art paintings have been around since the sixteenth century when Italian Renaissance Madonnari and French trompe l’oeil (French for ‘deceive the eye’) painters created stunning murals to decorate the interior walls of luxurious villas. 3d art can also trace it’s routes further back to ancient Greek days when painter Zeuxius (born around 464BC) painted a still life painting so convincing that birds flew down from the sky to peck at the painted grapes. The magic of 3d is created by painting a 2d picture and viewing it from a specific angle to capture the right perspective.

3d street paint art 50 More Breathtaking 3d Street Art (paintings)

In the twenty first century 3d street art has become incredibly popular, fueled by the internet’s capability to distribute photographs around the world at lightning speed and the use of the art by Brands to create innovative and talked about subtle advertising. 3d Street Artist’s have become famous for producing breathtaking design’s and in this article we are going to feature some of their latest and most awe-inspiring pictures.

More: 3D Street Art Paintings, Part I

Edgar Mueller

Third cave project. Ptuj, Slovenia.

Third cave project 50 More Breathtaking 3d Street Art (paintings)

Duality – Second of three ‘cave’ projects. Moscow, Russia.

Duality 50 More Breathtaking 3d Street Art (paintings)

Star Mild. Bandung Indonesia.

Star Mild 50 More Breathtaking 3d Street Art (paintings)

Street Advertising Services (SAS)

Shelterbox. London, England.

Shelterbox 50 More Breathtaking 3d Street Art (paintings)

Dolphin. London, England.

dolphin 50 More Breathtaking 3d Street Art (paintings)

Swans. London, England.

swans 50 More Breathtaking 3d Street Art (paintings)

TV Tiger, Berlin, Germany.

TV Tiger 50 More Breathtaking 3d Street Art (paintings)

Max Rules! Abu dhabi, UAE.

Max rules 50 More Breathtaking 3d Street Art (paintings)

Celebrating the release of Jamie Cullum’s new album. London, England.

Jamie Cullums new album 50 More Breathtaking 3d Street Art (paintings)

Brandon Trust bridge. Bristol, England.

Brandon Trust bridge 50 More Breathtaking 3d Street Art (paintings)

Jameson’s Cult Film Club. Liverpool, England.

Jamesons Cult Film Club Liverpool 50 More Breathtaking 3d Street Art (paintings)

Jameson’s Cult Film Club. Manchester, England.

Jamesons Cult Film Club, Manchester 50 More Breathtaking 3d Street Art (paintings)

A4e Road Trip. Wolverhampton, England.

A4e Road Trip 50 More Breathtaking 3d Street Art (paintings)

Unilever, Magnum Ice Cream. Essex, England.

Unilever Magnum Ice Cream 50 More Breathtaking 3d Street Art (paintings)

Ikea. London, England.

Ikea London 50 More Breathtaking 3d Street Art (paintings)

English Heritage. Newcastle, England.

English Heritage 50 More Breathtaking 3d Street Art (paintings)

Ropey bridge. London, England.

Ropey bridge 50 More Breathtaking 3d Street Art (paintings)

Going underground. London, England.

Going underground 50 More Breathtaking 3d Street Art (paintings)

London this way. Bath, England.

London this way 50 More Breathtaking 3d Street Art (paintings)

Put the Kettle on. London, England.

put the kettle on 50 More Breathtaking 3d Street Art (paintings)

Dirty Sewer. Manchester, England.

Dirty Sewer 50 More Breathtaking 3d Street Art (paintings)

Manfred Stader

Swimming Pool. Lodz, Poland.

Swimming Pool 50 More Breathtaking 3d Street Art (paintings)

Jinro, a Korean drink. Seoul, Korea.

Jinro Korean drink 50 More Breathtaking 3d Street Art (paintings)

Sony Ericsson. Vilnius, Lithiuania.

Sony Ericsson 50 More Breathtaking 3d Street Art (paintings)

Lincoln Mercury TV advert. Los Angeles, USA.

Lincoln Mercury TV advert 50 More Breathtaking 3d Street Art (paintings)

Games Convention – Need for Speed. Leipzig, Germany.

Games Convention 50 More Breathtaking 3d Street Art (paintings)

Created for Green Week. Brussels, Belgium.

Green Week 50 More Breathtaking 3d Street Art (paintings)

BMW. Berlin, Germany.

bmw berlin 50 More Breathtaking 3d Street Art (paintings)

Awareness for Maritime Week. Brussels, Belgium.

Maritime Week 50 More Breathtaking 3d Street Art (paintings)

Anti-AIDS campaign. Oslo, Norway.

Anti AIDS campaign 50 More Breathtaking 3d Street Art (paintings)

Waterfall in airport. Amsterdam, Netherland.

Waterfall Amsterdam Airport 50 More Breathtaking 3d Street Art (paintings)

Julian Beever

Crab Catching. London, England.

Crab Catching 50 More Breathtaking 3d Street Art (paintings)

Santa Claus. London, England.

santa clause 50 More Breathtaking 3d Street Art (paintings)

Two Worlds.

two world 50 More Breathtaking 3d Street Art (paintings)

Accident Railway Station. Zurich, Switzerland.

accident railway station 50 More Breathtaking 3d Street Art (paintings)

Accident Building site. Vienna, Austria.

accident building site 50 More Breathtaking 3d Street Art (paintings)

Slate Whiskey. Glasgow, England.

Slate Whiskey 50 More Breathtaking 3d Street Art (paintings)

Portable Computer. London, England.

portable computer 50 More Breathtaking 3d Street Art (paintings)

Bank. London, England.

bank 50 More Breathtaking 3d Street Art (paintings)

Rescue- Fireman is climbing down into the real world. London, England.

rescue 50 More Breathtaking 3d Street Art (paintings)

Ballantines. Montevideo, Uruguay.

Ballantines 50 More Breathtaking 3d Street Art (paintings)

Beneath every street. London, England.

Beneath every street 50 More Breathtaking 3d Street Art (paintings)

Coke. London, England.

coke 50 More Breathtaking 3d Street Art (paintings)

Tracy Lee Stum

Cliffs of Curacao. Curacao.

Cliffs of Curacao 50 More Breathtaking 3d Street Art (paintings)

Really hot Asphalt. Florida, USA.

Really hot Asphalt 50 More Breathtaking 3d Street Art (paintings)

Mousetrap. Florida, USA.

mousetrap 50 More Breathtaking 3d Street Art (paintings)

F1 Car at the Singapore Grand Prix. Singapore.

f1 singapore 50 More Breathtaking 3d Street Art (paintings)

Caution Steep Grade E3 Expo. Los Angeles, USA.

Caution Steep Grade 50 More Breathtaking 3d Street Art (paintings)

National Train Day. California, USA.

National Train Day 50 More Breathtaking 3d Street Art (paintings)

Lions Gate. China.

lions gate 50 More Breathtaking 3d Street Art (paintings)

Credits


Advertise here with BSA

Tuesday, May 3, 2011

Hongkiat.com: Creating A Rocking CSS3 Search Field

Hongkiat.com: Creating A Rocking CSS3 Search Field


Creating A Rocking CSS3 Search Field

Posted: 03 May 2011 03:56 AM PDT

CSS3 is the next generation style sheet language. It introduces a lot of new and exciting features like shadows, animations, transitions, border-radius etc. Although the specifications have not been finalized yet, many browser manufacturers have already started supporting many of the new features.

In this tutorial, we will explore some of these features like text-shadow, border-radius, box-shadows and transitions to create a rocking search field. The image below shows how the search filed looks like, or check out a working demo.

css search preview Creating A Rocking CSS3 Search Field

The photoshop version of this search field was created by Alvin Thong and can be downloaded from here. I have tried to recreate this search field using pure CSS3. It is to be noted that not all browsers support CSS3 features and to trying out this tutorial, you should use one of the modern browsers that support CSS 3 features.

Ready? Let’s get started!

1. HTML5 Doctype

We’ll start with the HTML markup. It is very simple, after the <!DOCTYPE html> HTML5 doctype and the <head> declaration, we have a <section> with an ID called #wrapper inside <body>. This is done simply to define the width of the content box and to align it to the centre of the page.

This is followed by a <div> with an ID called #main. This ID contains the styles that define the big white box around the input field and the search button. This <div> has a <form> declared inside it. The form has the text input field and the search button. Here is how the form looks like without any styles applied to it:

without css Creating A Rocking CSS3 Search Field

Here’s how the code looks like:

<!DOCTYPE html> <html> <head> 	<title>CSS3 Search Field</title> </head> <body> 	<section id="wrapper"> 		<h1>CSS3 Search Field</h1> 		<div id="main"> 			<form> 				<input type="text" id="search"> 				<input type="submit" class="solid" value="Search"> 			</form> 		</div><!--main--> 	</section><!--wrapper--> </body> </html> 

2. Creating the bounding box

To create the big box around the form, we will add styles to the <div> with the ID of #main. From the code shown below, you will notice that the box has been given a width of 400px and a height of 50px.

 #main { 	width: 400px; 	height: 50px; 	background: #f2f2f2; 	padding: 6px 10px; 	border: 1px solid #b5b5b5;  	-moz-border-radius: 5px; 	-webkit-border-radius: 5px; 	border-radius: 5px; 	-moz-box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.8), inset 0 2px 2px rgba(255, 255, 255, 1), 0 5px 0 #ccc, 0 6px 0 #989898, 0 13px 0 #dfdede; 	-webkit-box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.8), inset 0 2px 2px rgba(255, 255, 255, 1), 0 5px 0 #ccc, 0 6px 0 #989898, 0 13px 0 #dfdede; 	box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.8), inset 0 2px 2px rgba(255, 255, 255, 1), 0 5px 0 #ccc, 0 6px 0 #989898, 0 13px 0 #dfdede; } 

The important piece of code here is the border-radius declaration and the box-shadow declaration. For creating rounded corners, we have used the CSS3 border-radius declaration, "-moz-" and "-webkit-" browser prefixes have been used to ensure that this works in gecko and webkit based browsers. The box shadow declarations might look a bit confusing but it is actually very simple.

 box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.8), inset 0 2px 2px rgba(255, 255, 255, 1), 0 5px 0 #ccc, 0 6px 0 #989898, 0 13px 0 #dfdede; 

Explanation: Here, the keyword inset specifies if the shadow will be inside the box. The first two zero’s indicate the x-offset and the y-offset and the 3px indicates the blur. Next is the color declaration. I have used rgba values here; rgba stands for red green blue and alpha (opacity). Thus the 4 values inside the parenthesis indicate the amount of red, green, blue and its alpha (opacity). You will notice that 5 sets of shadow declarations have been clubbed together. This can be done by separating them with a comma. The first two shadows define the white "inner glow" effect and the next there declarations gives the box its solid/chunky look.

Play around with these values to understand how it works.

search box Creating A Rocking CSS3 Search Field
(Preview)

 

3. Styling the input field

Now that the box is complete, lets move on to styling the input field.

 input[type="text"] { 	float: left; 	width: 230px; 	padding: 15px 5px 5px 5px; 	margin-top: 5px; 	margin-left: 3px; 	border: 1px solid #999999;   	-moz-border-radius: 5px; 	-webkit-border-radius: 5px; 	border-radius: 5px;   	-moz-box-shadow: inset 0 5px 0 #ccc, inset 0 6px 0 #989898, inset 0 13px 0 #dfdede; 	-webkit-box-shadow: inset 0 5px 0 #ccc, inset 0 6px 0 #989898, inset 0 13px 0 #dfdede; 	box-shadow: inset 0 5px 0 #ccc, inset 0 6px 0 #989898, inset 0 13px 0 #dfdede; } 

The styles declared for the input field are pretty similar to those decared for the big box #main. We have used the same border radius (5px). Again, multiple box-shadows have been clubbed.

 box-shadow: inset 0 5px 0 #ccc, inset 0 6px 0 #989898, inset 0 13px 0 #dfdede; 

Explanation: You will notice that this time, the shadow blur has been kept at 0 to obtain a sharp shadow and a vertical offset of 5px is used. In the successive declarations, the blur has been kept at 0px but the color and the y-offset have been changed. Again, play around with these values to obtain different results.

with search box Creating A Rocking CSS3 Search Field
(Preview)

4. Styling the submit button

Let’s style the search button.

 input[type="submit"].solid { 	float: left; 	cursor: pointer; 	width: 130px; 	padding: 8px 6px; 	margin-left: 20px; 	background-color: #f8b838; 	color: rgba(134, 79, 11, 0.8); 	text-transform: uppercase; 	font-weight: bold; 	border: 1px solid #99631d;   	-moz-border-radius: 5px; 	-webkit-border-radius: 5px; 	border-radius: 5px;   	text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7), 0 -1px 0 rgba(64, 38, 5, 0.9);    	-moz-box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.7), 0 5px 0 #b8882a, 0 6px 0 #593a11, 0 13px 0 #ccc; 	-webkit-box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.7), 0 5px 0 #b8882a, 0 6px 0 #593a11, 0 13px 0 #ccc; 	box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.7), 0 5px 0 #b8882a, 0 6px 0 #593a11, 0 13px 0 #ccc; 	-webkit-transition: background 0.2s ease-out; } 

Apart from the colors, the search button has mostly the same styles as that of the outer box. Similar border-radius and box-shadows have been used on the button. The new feature introduced is the text-shadow.

 text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7), 0 -1px 0 rgba(64, 38, 5, 0.9); 

Explanation: In the text-shadow declaration, the first three numeric values are the x-offset, y-offset and the blur respectively. The rgba values indicate the shadow color. In the next set of declaration (separated by a comma), the y-offset is given a value of -1. This is done to give the text an “inner shadow” effect.
The hover/focus state of the submit button has different values of background color and shadows.

with search button Creating A Rocking CSS3 Search Field
(Preview)

"Active" state for button

The active state of the button has a bit more changes. In this, I have given the button a position of absolute and a ‘top’ value of 5px. This has been done to give it a more natural look, such that it feel that the button has actually been pushed down by 5 pixels. Other changes to the active state are that of background-color and shadows. Notice that I have reduced the y-offset of the shadows to give it a ‘pressed-down’ look. Here is the code for the active state of the submit button:

 input[type="submit"].solid:active { 	background: #f6a000; 	position: relative; 	top: 5px; 	border: 1px solid #702d00;   	-moz-box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.7), 0 3px 0 #b8882a, 0 4px 0 #593a11, 0 8px 0 #ccc; 	-webkit-box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.7), 0 3px 0 #b8882a, 0 4px 0 #593a11, 0 8px 0 #ccc; 	box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.7), 0 3px 0 #b8882a, 0 4px 0 #593a11, 0 8px 0 #ccc; } 

The Complete (CSS) Code

This completes our search field. We have used quite a few of the new CSS3 features. Here is the complete CSS and HTML of this search field.

 #main { 	width: 400px; 	height: 50px; 	background: #f2f2f2; 	padding: 6px 10px; 	border: 1px solid #b5b5b5;   	-moz-border-radius: 5px; 	-webkit-border-radius: 5px; 	border-radius: 5px;   	-moz-box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.8), inset 0 2px 2px rgba(255, 255, 255, 1), 0 5px 0 #ccc, 0 6px 0 #989898, 0 13px 0 #dfdede; 	-webkit-box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.8), inset 0 2px 2px rgba(255, 255, 255, 1), 0 5px 0 #ccc, 0 6px 0 #989898, 0 13px 0 #dfdede; 	box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.8), inset 0 2px 2px rgba(255, 255, 255, 1), 0 5px 0 #ccc, 0 6px 0 #989898, 0 13px 0 #dfdede; }   input[type="text"] { 	float: left; 	width: 230px; 	padding: 15px 5px 5px 5px; 	margin-top: 5px; 	margin-left: 3px; 	border: 1px solid #999999;   	-moz-border-radius: 5px; 	-webkit-border-radius: 5px; 	border-radius: 5px;   	-moz-box-shadow: inset 0 5px 0 #ccc, inset 0 6px 0 #989898, inset 0 13px 0 #dfdede; 	-webkit-box-shadow: inset 0 5px 0 #ccc, inset 0 6px 0 #989898, inset 0 13px 0 #dfdede; 	box-shadow: inset 0 5px 0 #ccc, inset 0 6px 0 #989898, inset 0 13px 0 #dfdede; }   input[type="submit"].solid { 	float: left; 	cursor: pointer; 	width: 130px; 	padding: 8px 6px; 	margin-left: 20px; 	background-color: #f8b838; 	color: rgba(134, 79, 11, 0.8); 	text-transform: uppercase; 	font-weight: bold; 	border: 1px solid #99631d;   	-moz-border-radius: 5px; 	-webkit-border-radius: 5px; 	border-radius: 5px;   	text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7), 0 -1px 0 rgba(64, 38, 5, 0.9);    	-moz-box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.7), 0 5px 0 #b8882a, 0 6px 0 #593a11, 0 13px 0 #ccc; 	-webkit-box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.7), 0 5px 0 #b8882a, 0 6px 0 #593a11, 0 13px 0 #ccc; 	box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.7), 0 5px 0 #b8882a, 0 6px 0 #593a11, 0 13px 0 #ccc;   	-webkit-transition: background 0.2s ease-out; }   input[type="submit"].solid:hover, input[type="submit"].solid:focus { 	background: #ffd842;   	-moz-box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.9), inset 0 2px 1px rgba(255, 250, 76, 0.8), 0 5px 0 #d8a031, 0 6px 0 #593a11, 0 13px 0 #ccc; 	-webkit-box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.9), inset 0 2px 1px rgba(255, 250, 76, 0.8), 0 5px 0 #d8a031, 0 6px 0 #593a11, 0 13px 0 #ccc; 	box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.9), inset 0 2px 1px rgba(255, 250, 76, 0.8), 0 5px 0 #d8a031, 0 6px 0 #593a11, 0 13px 0 #ccc; }   input[type="submit"].solid:active { 	background: #f6a000; 	position: relative; 	top: 5px; 	border: 1px solid #702d00;   	-moz-box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.7), 0 3px 0 #b8882a, 0 4px 0 #593a11, 0 8px 0 #ccc; 	-webkit-box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.7), 0 3px 0 #b8882a, 0 4px 0 #593a11, 0 8px 0 #ccc; 	box-shadow: inset 0 0 3px rgba(255, 255, 255, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.7), 0 3px 0 #b8882a, 0 4px 0 #593a11, 0 8px 0 #ccc; } 

Demo and Download

If you are lost at any point or couldn’t follow up with the tutorial, no worries, we’ve got the tutorial zipped in a single file. Download it to your desktop and it’ll work just fine.

Hope you enjoyed this tutorial. Feel free to experiment with these features and don’t forget to share your thoughts.


Advertise here with BSA

Monday, May 2, 2011

Hongkiat.com: WordPress Search: Useful Plugins and Snippets

Hongkiat.com: WordPress Search: Useful Plugins and Snippets


WordPress Search: Useful Plugins and Snippets

Posted: 02 May 2011 05:36 AM PDT

WordPress is a powerful CMS tool not only powering blogs but countless forums and personal web pages. Many of the features offered are quite advanced for the market, yet their search still seems to be lagging. The functions offer a very simple solution for an extremely complex problem – finding the right content on your site!

Although the functions are great for searching out articles based on direct matches, the system falls short with many possible uses. More specifically the inability to search between all categories, tags, or even a specific category and/or tag. Similarly all posts are displayed on default by date, newest to oldest. This is a huge gap in UX, what about users who may be looking for popular articles with the most views or comments?

wordpress search Wordpress Search: Useful Plugins and Snippets

Below I’ve offered a brief look into WordPress’ search features and how they work within the system. Understanding how everything runs out of the box will make manipulating searches much easier. Additionally I’ve added a few powerful plugins and code snippets desirable for any WP website.

the Basic of WordPress Search

When running a search query through WordPress all results are returned based on publication time. This would include pages, which would be great, if WordPress has set the ability to do so. Two great plugins Search Unleashed and Search Everything provide fixes allowing users to search through pages and comments as well. One major problem is how WordPress ignores the power of keywords within search.

wordpresscom search Wordpress Search: Useful Plugins and Snippets

If an article was published a year or two ago the odds of it being found in a search are slim to none. This is unless the user is entering the keywords they want into a larger engine such as Google or Bing. When you search for “web design” WordPress is looking to match for exactly that. WordPress developers may be working on updates, but such a query would not return results containing simply design.

Similarly what about post categories and tags? These can be matched in keywords and throw off an entire search. The distinct functions behind WordPress’ search are prehistoric compared to most, which thankfully the system can be openly updated from within the development community.

WordPress Theme Files

Inside each WordPress theme folder is a set of search files. These appear to be useful for functionality and powerful search forms. Inside the root template file search.php you will find the general template for search results.

Many times I’ll hear developers fabricating the mistake of including their search.php inside another core file, such as page.php or single.php. This is a strong technique for building modular templates, however the straight search file is used for displaying pagination and results only. The standard file name searchform.php is what would include some basic PHP code for calling search query data. The rest of the file is a straight HTML form including one (1) input field and a submit button.

wp theme files Wordpress Search: Useful Plugins and Snippets

This file is often included in the heading or sidebar area of templates. It offers an elegant solution to include a ready-made form and users can take advantage of the many powerful search techniques offered in WordPress. From the many new attributes in HTML5 it’s possible to offer default text inside the input field such as “search…” or “enter terms here”.

When entering in data to display your search form, the simplistic routine may happily surprise you. There is a simple function written get_search_form() which can be added anywhere in your templates to display the contents of searchform.php. This is an internal function developed by WordPress and used to make development for search functionality easy as pie!

WP Query Function

There is a function written into WordPress’ backend which can be utilized for direct SQL queries. WP_query() has been used by WordPress developers and theme designers alike to create custom search queries more complex than WordPress’ default.

wp query codex Wordpress Search: Useful Plugins and Snippets

If you’re a developer I recommend reading through the function reference page for a bit of insight on the methodology. The documentation is very long and probably won’t be used by many. There are some real neat features such as pulling specific posts or categories based on which content is currently displayed in-page.

The Query function also allows for checking against the current page value. WordPress automatically gives a name towards each type of page on your site. Blog posts, pages, search results, and home are just a few examples. Below I’ve outlined a brief list of common page variables for those interested in examining beneath the surface.

  • $is_single – viewing a single post page
  • $is_author – viewing an author post directory page
  • $is_search – viewing a search results page
  • $is_category – $is_tag – viewing a list of posts by category or tag
  • $is_404 – viewing 404 error page

16 Plugins to Enhance Search

Below I’ve included links to a few popular plugins related to search and queries. These are all free and offered for download from WordPress’ official extensions directory. I’d highly recommend against installing more than 2 or 3 of these at a time – read up on the descriptions and test one-by-one to see if there’s anything which perfectly suits your blog!

Google Custom Search Plugin
The default option for searching in WordPress isn’t really the best solution. Oftentimes webmasters would rather funnel their search queries through Google for quicker and more targeted results. After installation this plugin will automatically rewrite the default WordPress search form with a custom Google Search. Adopts a new set of friendly URLs on-the-fly!

Google Custom Search Plugin Wordpress Search: Useful Plugins and Snippets

Enhanced Search Form
By default the WordPress search form is a standard input field. This is great for basic queries involving specific keywords, but for advanced users the default options fall short. Enhanced Search Form will dynamically generate an XHTML form which accepts new search terms such as Boolean AND statements.

Enhanced Search Form Wordpress Search: Useful Plugins and Snippets

Search Everything
Search Everything is another great all-in-one plugin for supporting your advanced searching needs. A few of the most popular features include search highlighting, custom taxonomies, browsing approved comments and many more! The administration panel is very simple and setup is a breeze.

Search Everything Wordpress Search: Useful Plugins and Snippets

WordPress Sphinx Search Plugin
The Sphinx server can offload the heavy search queries from your server into other remote settings. Upon activation you’ll notice super-fast speeds and are able to sort results according to freshness and relevance. Additionally the plugin is capable of displaying a sidebar widget of most recent and top related search keywords.

WordPress Sphinx Search Plugin Wordpress Search: Useful Plugins and Snippets

Search Meter
Search Meter is a fascinating idea for those webmasters interested in tracking analytics. Every search query is stored and archived in the admin panel with extra details examining search analytics. You’ll be given data about how many searches were failed or turned up no results, as well as popular and recent search terms. The plugin will generate statistics which you can reset or export for examination.

search meter plugin Wordpress Search: Useful Plugins and Snippets

Fast WordPress Search
Fast WordPress Search is a basic replacement plugin for WordPress’ default engine. This will generally return more relevant pages and slightly speeds up the process. The process was written to work with WP’s vast library of functions to reduce database calls and return quicker results for intense queries. The install is also accompanied by benchmark tools to compare times.

fast wordpress search Wordpress Search: Useful Plugins and Snippets

Amazon Search Widget
If you work with Amazon’s affiliate program then you’ll love this next plugin. With a few simple steps and a single template edit it’s very convenient to implement a Flash-based search form. This will search within Amazon’s library to pull data about products and new releases. From here it’s a simple process of entering your affiliate ID to start earning money from your blog searches!

amazon search widget Wordpress Search: Useful Plugins and Snippets

Looser Search Plugin
Here we have a small plugin with great expectations right after install. The Looser Search Plugin modifies already built-in processes from within WordPress libraries to match keywords instead of full terms. An internal dictionary of common English words is skipped over to speed up the search process. If you’re looking for a basic plugin to install and get the quickest results I’d highly recommend this one.

looser search plugin Wordpress Search: Useful Plugins and Snippets

Dave’s WordPress Live Search
If you are a fan of Microsoft Live Search this simple plugin will amplify your blogging experience. Offering results from Live Search will mean higher relevancy and quicker load times than internal processing. The plugin is made to provide instant up-to-date results as the user types – all powered behind the scenes with jQuery and some basic CSS styles. Try installing and see if your blog can handle the page load, as it provides an amazing user experience to search results.

daves wordpress live search Wordpress Search: Useful Plugins and Snippets

Search Tag Cloud
This plugin provides you with easy access to develop a simple tag cloud. This will result in great rankings from Google as more in-links will be leading to your blog pages. Additionally the user experience is dramatically increased when you consider how many posts can be found with just a few clicks. The plugin requires standard installation steps and has been developed with SEO in mind.

search tag cloud Wordpress Search: Useful Plugins and Snippets

Highlight Search Terms
You may have seen this plugin being adopted in countless blogs today. Whenever a visitor finds your page through a major search engine (Google, Yahoo!, Bing, Lycos, Ask…) each of the keywords will be highlighted in your content. This helps visitors figure out where the page content is located and what reference frame it’s in. By default there are no core CSS styles, so you’ll have to design these yourself after activation.

wp highlight search terms Wordpress Search: Useful Plugins and Snippets

Better Search
Better Search, as the title implies, is a standard plugin to give your WordPress blog better search. Each results page is split based on keyword relevancy and advanced techniques for recognizing meta tags, post tags, and categories. When typing the new search form will display the most popular search terms being searched throughout your blog. This is updated frequently based upon how much traffic your search queries bring in!

better search options Wordpress Search: Useful Plugins and Snippets

Search Light
As you may have seen many places elsewhere the update-as-you-type functionality has exploded. Since the release of Google Instant many other search providers have been rolling out similar techniques. Search Light is a fantastic plugin which uses an Ajax dropdown interface to create dynamic menus of related queries. It’s also possible to tie in your post thumbnails and total number of results inside the search bar itself.

wordpress search light Wordpress Search: Useful Plugins and Snippets

WP Instant Search
This plugins requires a few external libraries, although offers similar functionality as the previous Search Light. If you really enjoy Ajax dropdown suggestions you’ll find plenty of the same features here with WP Instant Search. The plugin is updated to the most recent version WordPress 3.0.5 and will check against WordPress tags, posts, pages, and categories.

wp instant search Wordpress Search: Useful Plugins and Snippets

WP E-commerce Product Search Widget
This plugin supports widget displays for an e-commerce solution running over WordPress. When you’re selling items or even software online it’s important your e-commerce solution is simple to navigate and products are easy to find. With this nifty plugin we can replace WordPress’ stale search functionality to include a new query view. Results pages will list products in a grid-style layout and holds compatible up to the most recent release.

wp ecommerce product search Wordpress Search: Useful Plugins and Snippets

ThreeWP Ajax Search
A no-nonsense plugin for Ajax searches. Just download and install the plugin to get a sense of how easy the process will unfold! Default settings work perfectly with the Twentyten theme and all derivatives. One cool feature is how this plugin still works around WordPress’ default search engine. In this case you don’t lose anything from WordPress’ powerful library and instead only gain magnificent front-end experience effects. There are many options for customization including CSS styles and jQuery speeds and animation styles.

threewp ajax search plugin Wordpress Search: Useful Plugins and Snippets

5 Useful Search Snippets

1. Exclude Post/Page from Search Results

The following function, allows you to exclude posts of any categories, or even pages out of the search results. (via wprecipes)

(functions.php)

 function SearchFilter($query) {     if ($query->is_search) {         $query->set('cat','0,1');     }     return $query; }  add_filter('pre_get_posts','SearchFilter'); 

2. Searching a specific Category

Return search results from a specific category.

(functions.php)

 function SearchFilter($query) {   if ($query->is_search) {     // Insert the specific categories you want to search     $query->set('cat', '8,9,12');   }   return $query; }  add_filter('pre_get_posts','SearchFilter'); 

3. Searching a specific post type

Filter out all other post types and target your search to a specific WordPress post type. (via ashbluewebdesign)

(functions.php)

 function SearchFilter($query) {   if ($query->is_search) {     // Insert the specific post type you want to search     $query->set('post_type', 'feeds');   }   return $query; }  // This filter will jump into the loop and arrange our results before they're returned add_filter('pre_get_posts','SearchFilter'); 

4. Highlight WordPress Search Terms (jQuery)

Highlights search terms in WordPress result page. (via weblogtoolscollection)

(functions.php)

 function hls_set_query() {   $query  = attribute_escape(get_search_query());    if(strlen($query) > 0){     echo '       <script type="text/javascript">         var hls_query  = "'.$query.'";       </script>     ';   } }  function hls_init_jquery() {   wp_enqueue_script('jquery'); }  add_action('init', 'hls_init_jquery'); add_action('wp_print_scripts', 'hls_set_query'); 

(header.php), before </head>

 <style type="text/css" media="screen">     .hls { background: #D3E18A; } </style>  <script type="text/javascript"> jQuery.fn.extend({ highlight: function(search, insensitive, hls_class){   var regex = new RegExp("(<[^>]*>)|(\\b"+ search.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1") +")", insensitive ? "ig" : "g");   return this.html(this.html().replace(regex, function(a, b, c){ 	return (a.charAt(0) == "<") ? a : "<strong class=\""+ hls_class +"\">" + c + "</strong>";   })); } }); jQuery(document).ready(function($){ if(typeof(hls_query) != 'undefined'){   $("#post-area").highlight(hls_query, 1, "hls"); } }); </script> 

5. Display Search Term + Result(s) Count

Return search queries and number of results. Example – Search Result for twitter – 8 articles. (via wpbeginner)

 <h2 class="pagetitle"> 	Search Result for 	<?php /* Search Count */ 	$allsearch = &new WP_Query("s=$s&showposts=-1"); 	$key = wp_specialchars($s, 1); 	$count = $allsearch->post_count; 	_e(''); _e('<span class="search-terms">'); 	echo $key; _e('</span>'); _e(' &mdash; '); 	echo $count . ' '; _e('articles'); wp_reset_query(); 	?> </h2> 

(bellefoong)


Advertise here with BSA