You can transform sections of your website into individual blogs or topical sections. For websites with both breadth and depth of content, building a search function for specific categories could be great for user-experience. This can be a very handy web design practice for content websites, resource websites or larger blogs.
For example, below is a search request for the word "wordpress" within the "articles" category.
https://example.com/category/articles/?s=wordpress
By limiting search to specific categories, users will be able to mine sections of your website for more specific topics and resources. It will be important to indicate that the search function implemented is category specific.
<form method="get" action="<?php bloginfo('url'); ?>">
<fieldset>
<input placeholder="search category" type="text" name="s" value="" maxlength="50" required="required" />
<select name="category_name">
<option value="industrynews">Industry News</option>
<option value="webdesign">Web Design</option>
</select>
<button type="submit">Search</button>
</fieldset>
</form>
Before installing a pre-made plugin, try the above form to create a simple search function for your website. Embed the code in the sidebar.php file inside your active theme, and change the category options to your actual category names and IDs. Certainly, you could dynamically pull the list of categories for websites and blogs with a larger set of categories. But the above method is fine for websites with a few categories that are more permanent.
Public query vars allow you to develop direct URL queries. example.com/?variable1=value1&variable2=value2 - You can also create custom query vars that you append to URLs (eg: "https://mysite.com/some_page/?s=my_var=foo"
Wordpress makes it easy for web designers to build tools and custom the user-experience.
by Jonathan Franchell, CEO of Ironpaper - For more tips and hacks: Need to remove a new line after h1 tags? Both web designers and SEO practitioners need to employ headline tags: H1, H2, H3 in several ways to improve web page structure and tag...
The Crowded Arena of the IT Marketplace Updated December 2024 The Information Technology (IT) landscape is experiencing rapid growth and intensifying competition. IT spending is projected to reach nearly 5.1 trillion U.S. dollars in 2024, a...
Updated December, 2024 The field of digital marketing is evolving rapidly in response to new technology and changing buyer expectations. To help career-minded marketers, we’ve rounded up the top 10 skills needed to succeed in the field. These are...