# Display specific page if user signed in

I have a business directory website. I'd like to know how to create a page display condition. Basically, when clicking on the "add a listing" button, how do I make non-logged-in users be directly taken to the login/sign up page instead of the "choose a listing type" page?

(Currently, all users are taken to the "choose a listing type" page, and if not logged in, after choosing the type are asked to sign-in/sign up and then taken BACK to the "choose a listing type" page. It's a lot of unnecessary back-and-forths.)

• What is the add a listing button and how is it implemented in code? – Tom J Nowell Jul 30 at 23:08

function user_redirect_page() {