Want the search bar on the homepage to go to the sign in / sign up page before showing any results

Hi Hivepress,

On the homepage of the website I am working on I need it so that when someone tries to search for something via the homepage, when they click submit they are taken to the log in / sign up page first so that the general public don’t have access to the whole directory. At the moment the button goes straight to the results page.

Please see the link to the website below:

Is there a way to make this happen?
Thank you in advance

Hi,

Please use this PHP snippet: Hide the listing pages from non-registered users (redirect to login form) #hivepress #listings · GitHub

​I hope this is helpful to you.

Thank you! This worked!

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