# How to make required to select category in search engine then only search

**URL:** <https://community.hivepress.io/t/how-to-make-required-to-select-category-in-search-engine-then-only-search/17753>\
**Category:** HivePress\
**Created:** [June 10, 2026, 8:42pm UTC](https://community.hivepress.io/t/how-to-make-required-to-select-category-in-search-engine-then-only-search/17753 "2026-06-10T20:42:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Renterworld](https://community.hivepress.io/letter_avatar_proxy/v4/letter/r/eb8c5e/32.png) [@Renterworld](https://community.hivepress.io/u/Renterworld)\
**Post date:** [June 10, 2026, 8:42pm UTC](https://community.hivepress.io/t/how-to-make-required-to-select-category-in-search-engine-then-only-search/17753/1 "2026-06-10T20:42:59Z")

</div>

in search bar the use is able to search without selecting any category . how to make category selection required any setting chnage or is there any code i can add as snippet please provide .

---

<div class="post-metadata">

**Author:** ![kseniia](https://community.hivepress.io/user_avatar/community.hivepress.io/kseniia/32/13513_2.png) [@kseniia](https://community.hivepress.io/u/kseniia)\
**Post date:** [June 12, 2026, 9:01pm UTC](https://community.hivepress.io/t/how-to-make-required-to-select-category-in-search-engine-then-only-search/17753/4 "2026-06-12T21:01:39Z")

</div>

Hi,

You can consider enabling the Display Categories instead of Listings option in HivePress \> Settings \> Listings. When a user clicks without selecting a category, they will see category blocks to choose from rather than listings.

Alternatively, this can also be achieved with a PHP snippet. Please note that developer guidance and custom snippet solutions are available as part of our premium support.

---

<div class="post-metadata">

**Author:** ![system](https://community.hivepress.io/user_avatar/community.hivepress.io/system/32/13990_2.png) [@system](https://community.hivepress.io/u/system)\
**Post date:** [July 12, 2026, 9:02pm UTC](https://community.hivepress.io/t/how-to-make-required-to-select-category-in-search-engine-then-only-search/17753/5 "2026-07-12T21:02:27Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
