I have a home/static page with login button. Currently I've set the button url as "http://example.com/login"
How can I set the login button to redirect to a specific page IF/WHEN the user is logged in?
I do not know much about coding. I found some solution about add_action or something and added to theme's function.php. But I can't get it work.
Summary: if non-login user: login button url ---> login page if login user: login button url ---> specific page