Hi in this post we are going to learn How to get category wise search and archive results in WordPress.
in WordPress, there is much 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 find out 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 the value after input type text field with name s
and for archive give ?cat=<category id> after archive URL