How to add search alert options for categories on homepage

Hi everyone,

I’m working on a room rental website and I want to add a popup on the homepage where users can select rental categories (e.g. “Common Room”, “Whole Unit”, etc.) and subscribe to search alerts without needing to perform a search first.

The idea is:

  • The popup shows a few category buttons.
  • When a user clicks a button, they’re subscribed to email alerts for that category.

What’s the best way to implement this?
Is there a way to trigger this with a simple button + form without having to build a full filtering flow?

Any advice or examples would be appreciated. Thanks!

1 Like

Hi,

Unfortunately, there’s no such feature, it would require a custom implementation. As a workaround, I recommend using the Search Alerts extension, but note that this will require a search.

​I hope this is helpful to you

I already have the search alert extension. However due to the hidden nature of this function most users are unaware. Hence i would like to know how they will be able to subscribe to search alerts with predetermined criteria

Hi,

Your request is related to a premium product. Please add the license key to the account settings to access forums for your purchased products and get the Premium Support badge on your profile. If the support for your purchase has expired, please consider renewing it for assistance Renew Support | HivePress

I have extended my support. Are you able to assist me now thank you

Unfortunately, there’s no simple code snippet for implementing this, but we can provide general developer guidance if you’re familiar with coding or have a developer for custom work. We also provide customization services if you consider this option Customize your website | HivePress

To implement this, I recommend adding a modal via JS (or using one of the popup plugins available for WordPress), with the category grid (this should also be implemented via HTML/CSS), or as a temporary solution you can use the existing UI controls (e.g. checkboxes or multi-select drop-down). This form should send a REST API or a simple AJAX request to save search alerts for the selected categories, you can also re-use (or check how search alerts are created with PHP) in the existing function that creates them in the Search Alerts extension here Awesome Screenshot

Hope this helps

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