WordPress how to get search result and archives list by category name

Hi in this post we are going to learn How to get category wise search and archive result in wordpress.

Archive

Archive

Search Form

Search Form

in wordpress there is many time we have to get the search and archive result by category , so in this post we will learn how to get search result and archive result by category,

for that you have to findout the category id and for that go to wordpress admin->posts->category and hover on the category and click on the edit link and copy the post id from url

now for search take a hidden type field with name cat and give the category id as value after input type text field with name s

and for archive give ?cat=<category id> after archive url

 

and it will provide the result according to the category id

thanks for reading

Share The Post On -

Add a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.