• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

nSiteful Web Builders

Building a Better Web - One Site at a Time.

  • Home
  • About
    • Testimonials
    • Resources
    • Partner With Me
    • Frequently Asked Questions
  • Web Sites
  • Online Marketing
  • WordPress Support
    • Customized WordPress Training
    • 60-for-60 Sessions
  • Web Applications
  • Blog
    • At-A-Glance
    • Blog Articles Grouped by Category
    • Case Studies
    • General
    • Portfolio
    • Reviews
    • Snippets
    • Techniques
  • Contact
    • Purchase Retainer Consulting Hours
    • About Retainer Consulting Hours
    • Book a Meeting with Jeff
    • Tell Me About Your Web Project
    • nSiteful Newsletter Archives
    • nSiteful Rewards
Categories and Tags links

By Jeff - 10/26/2018
Cats: Techniques · Tags: Blogging, Plugins, Taxonomies, WordPress

techniques

Help Your Blog Readers Find What They’re Looking For with the Search & Filter Plugin

Last updated August 5th, 2022 at 04:22 pm

This article shows you how you can use a simple, lightweight plugin to make it easier for your Web visitors to find what they’re looking for in your blog. The plugin, Search & Filter, is one I installed long ago, deactivated because I hadn’t followed directections, and then forgot about — until just the other day.

And isn’t making our visitors’ experiences better what it’s all about?

Preface: How I Structure Blog Posts

In the Web sites I build, and especially in my own, I try hard to utilize taxonomies (usually Categories and Tags) to organize blog articles in ways that make it easy for visitors to find what they’re looking for.

Taxonomies are nothing more than ways to group content.

I tend to use categories as broad, mutually exclusive classifications. In other words, I assign only one category to each blog post. Also, I try to use only a few catetories. The current categories in this blog are:

  • Case Studies
  • First Looks
  • General
  • Reviews
  • Snippets
  • Techniques

As for tags, I use them in a “many-to-many” fashion, and I use a lot of them. Tags are topics (in the case of this blog, CSS, WordPress, php, etc.). Each blog post could be assigned multiple tags, and any given tag could (actually should, or else you’re doing it wrong) be assigned to multiple posts.

As I wrote in this blog post from years ago, I think of categories as the chapters in a book’s table of contents and tags as the entries in a book’s index.

How Visitors Use Categories and Tags

Many blog readers know they can view a listing (archive, in WordPress parlance) of posts in a certain category or assigned a certain tag by clicking on the category/tag links that typically appear at the top or bottom of a blog post.

Filter Blog Posts by Categories and Tags links

I do this all the time when reading others’ blogs. It’s potentially a helpful time-saver.

But I’ve often wished for something better than having to choose between the category archive and the tag archive.

The Problem:

Suppose I were a visitor to this blog and I’m pressed for time and I’m particularly interested in finding useful php snippets. Maybe I’ve visited before and found some useful ones, and I want to see if any new php snippets have been added.

To address this issue, and to make it even easier for visitors to find what they want on my blog, I created a custom listing of posts grouped by category. Check it out here; the page will load in a new browser window so you can continue reading this article.

By clicking on “php” in the tag cloud or at the bottom of a post, I’d see a listing of all posts tagged “php”. But that listing would include posts in all categories.

Or I could click on the “Snippets” category link and get a listing of all snippets. But that listing would include posts about all kinds of snippets — WordPress, JavaScript, CSS, etc., in addition to php.

Sure, I could navigate through all the archive pages and scan for the php snippets posts. But that isn’t ideal.

The Solution

Yesterday I discovered in one of my sites a plugin I had deactivated months ago because it couldn’t do — or so I thought — something I wanted it to do.

The plugin is Search & Filter, and it turns out the problem was due to user error.

Search & Filter purports to be an improvement over the standard WordPress search box. This, from the description at the WordPress repository (emphasis mine):

You can search by Category, Tag, Custom Taxonomy, Post Type, Post Date or any combination of these easily to really refine your searches – remove the search box and use it as a filtering system for your posts and pages. Fields can be displayed as dropdowns, checkboxes, radio buttons or multi selects.

It was the part about using the plugin as a filtering system that caught my eye and interest.

Warning/Disclaimer

There is a bug in version 1.2.10 of the plugin, which can be fixed in 20 seconds by anyone who knows how to edit and FTP a php file (see below). The plugin author announced 16 months ago that he plans to update the plugin (which he has not done) and that he will not offer support in the meantime (also which he has not done). Not wonderful.

The Bug and How to Fix

Depending on the version of php your site uses, you may get this error:

Warning: Invalid argument supplied for foreach() in /home/[your_site]/public_html/wp-content/plugins/search-filter/search-filter.php on line 578

…and then other messages about “Headers already sent”.

Here’s the fix, thanks to @coffeehero in the plugin support forum:

Find this on line 578 of search-filter.php…

foreach($wp_query->query as $key=>$val)

…and change it to..

foreach((array) $wp_query->query as $key=>$val)

How to Filter Blog Posts with the Search & Filter Plugin

Installation is standard, and the plugin works by shortcode. I don’t need to tell you how the shortcode works, because all the documentation is here.

To achieve the filtering I’m looking for, I don’t even include the search box. If someone wants to search for a string of text, he/she can use the built-in search form, as far as I’m concerned. Remember, the problem I want to solve is helping someone find posts with a specific tag in a specific category — quickly and easily.

So, whether you’re looking for php (tag) Snippets (category), or WordPress (tag) Case Studies (category), or CSS (tag) Techniques (catetory), here’s the search form you can use (go ahead and try):

And here’s the shortcode:

[[searchandfilter fields="category,post_tag" hide_empty="1,1" show_count="0,1"]]

Final Thoughts

If you want to make it easier for your Web visitors to find what they’re looking for in your blog (and why wouldn’t you?), consider installing this lightweight (173 KB) plugin. Notwithstanding the above-referenced bug and lack of support, it’s a nifty solution.

By the way, remember that the plugin also supports custom post types, custom taxonomies, and post dates. You might want to use a more full-blown search form than I’m using.

Note: There’s a Pro version of the plugin which supports dynamic filtering, which prevents users from getting empty results. In other words, using my example, after selecting one category, the plugin will dynamically filter the tags that appear in the Tag dropdown, removing any tags not associated with the selected category and updating the counts of those that do. (Dynamic filtering also works in the other direction, if you select Tag first.) However, when I tested the demo for the pro version, I found the dynamic refresh too sluggish. YMMV.

Like what you see? Share with others and join my mailing list. No long-term commitment, unsubscribe any time.

Related Posts

  1. WordPress Categories and Tags
  2. How to add an About Us blurb to every WordPress blog post
  3. Display WordPress and WooCommerce Tags as Lists
  4. Blog Tags: What They Are (and What They’re Not)
  5. Read Blogs More Efficiently (and Enhance your Blog Reading Experience) Using Categories and Tags

Reader Interactions

Comments

  1. Nana EL says

    April 12, 2019 at 11:26 pm

    [* Shield plugin marked this comment as “spam”. Reason: Human SPAM filter found “for your article” in “comment_content” *]
    Hello, thanks for your article, it made me reactivate the plugin. But i’m facing an issue i would you to assist me with. When i click on the submit or the search button it only displays the post heading and not the entire post. I need it to display the entire post with a picture and some other features but it only displays the post title. How do i get that fixed please. Thanks.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

mailchimp signup

Subscribe to get notified when new articles are published. Unsubscribe any time. No spam. I promise. Check out my newsletter archives.

social

Twitter Facebook LinkedIn

Recent Articles

  • Custom MemberPress Pricing Pages December 19, 2025
  • CSS Data Attribute Override December 11, 2025
  • MemberPress Rules Using Custom Taxonomies and Custom Roles December 10, 2025
  • WP Staging Plugin: a First Look November 21, 2025
  • How to overlap elements with HTML and CSS (Grid) only August 13, 2025

Filter By Category/Tag

Categories

  • Case Studies (8)
  • For Staff (1)
  • General (72)
  • Portfolio (7)
  • Reviews (14)
  • Snippets (23)
  • Techniques (52)

Popular Tags

Advanced Custom Fields Blogging Child Themes Content Marketing CSS Customer Service Custom Fields Custom Post Types Diagnostics Domain Names Facebook FooGallery Genesis Hosting HTML Images iPhone Libra Live Chat Marketing Media MemberPress MemberPress Courses Membership Sites Mobile-Friendly MySQL Photo Gallery php Pinterest Plugins Post Formats Pricing Project Management SEBA SEO Seth Godin Shortcodes Social Networking Surveys Taxonomies Twitter Video Web design Web forms WordPress

Footer

Background

Web Sites | WordPress Support | Web Applications.

Formally trained in liberal arts and education (I have a B.A. in Government from Harvard and studied Secondary Education at Rutgers Graduate School), I have honed my skills in the communication arts and sciences as a teacher, trainer, instructional designer, writer, photographer, calligrapher, helpdesk manager, database programmer, and multimedia developer.

(I've also been a group counselor, waiter, bartender, bicycle messenger boy, computer salesman, carpenter's helper, financial analyst, and school board president.)

Tech

Systems since 1983.
Web sites since 1994.
PHP since 2001.
WordPress since 2007.

Contact

Book Meeting
770-772-5134
Email Jeff
Send Money
All Ways

Copyright 2026, nSiteful Web Builders, Inc.

Cookies Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}
https://iframe.mediadelivery.net/embed/392008/42d18bc1-2adc-4741-b733-053d08d09c32
https://vz-000c5976-3ab.b-cdn.net/42d18bc1-2adc-4741-b733-053d08d09c32/play_720p.mp4

Receive occasional emails from Jeff