How to Create a Search by Category in WordPress Tutorial

preview_player
Показать описание
In this WordPress tutorial video we show you how to create search by categories functionality in your custom WordPress theme. Giving the user the ability to search by categories without having to find plugins is a fantastic way to build in great UX into your WordPress theme from the ground up.

More web design and WordPress tutorials available on our channel!

Don't forget to check out more of our videos and subscribe!

Square One Media - Responsive web design specialists.

Рекомендации по теме
Комментарии
Автор

I am watching this in May 2021 and i copied the code into my site and it works. So simple. It's surprising how convoluted and complicated other solutions are to incorporate the ability to search categories. Thanks for this.

georgecaplan
Автор

Thanks for creating this tutorial and the accompanying 'Sort Posts Dropdown' too! I have been searching for a simple method to output for example, a grid of categorised images/projects for a portfolio site. Much appreciated 5 years later 😉😁👏👍

sororbudwiser
Автор

I really enjoyed this... thank you so mush... was trying to figure this out for over a month.

kamalhines
Автор

Thanks for a straight-forward, useful video on a nice WordPress feature. Just what I was looking for.

gregoryharris
Автор

Great tut! Just what I needed to learn. Thanks!

miklerosswell
Автор

Great man, thanks you so much. Can I make more than one?

Saefo
Автор

thank u for this video., sir. plz can u make a video for search by custom post type name, taxonomy and for custom field without search plugin. same like this.

arunasaini
Автор

Hi, in a similar way how we can add custom post multiple taxonomies terms in the dropdown and then search post for instance

Form Filed:
Keyword Field

Category Dropdown:
1-Select Category
a-Category 1
b-Category 2

Custom Post Types Taxonomies:
1-Location
a- City Name 1
b- City Name 2

Custom Post Types Taxonomies:
1-Type
a- Type 1
b- Type 2

muhammadalam
Автор

I'm using AJAX Search for WooCommerce for ajax search. I tried this method but the selected category is not showing related posts instead it shows all posts as if it is not working. Please help.

unknownman
Автор

can you plz tell how to get rid of the default search bar and have only a search icon there, I'm using 2017 theme. it would be great help.

Himanshu-xmcw
Автор

how filter by multi taxonomy admin?
Can you guide this function?
thanks admin

chengchivasentertainment
Автор

What if we want the dropdown option under the search and not beside it?

GauravKumar-eibt
Автор

It's only showing the last three results on the results page.. How do I fix it. The weird part is whenever I don't search in a category, it does show all posts. But when I do search in a category, it only shows three..

theRTT
Автор

Thank you for this tutorial! Sadly the source code is not available anymore

dominikherrmann
Автор

Say if I need to list posts on multiple pages each post has two categories (e.g. country & genre or location & price) then how do i go about searching the posts by the both of categories?

Also where does that $cat come from?

miklerosswell
Автор

I get an error on almost every line when adding to code snippets. I have tried this on two different templates. This code must not work anymore.

NeddyRich