php – How to add a custom filter (by coding) before access one wordpress page ? And where to call the custom filter?
My requirement is to create a survey in wordpress, and the user needs to log in before answering. But the login page uses our own business account, so we created a login page ourselves (using .net core). Therefore After logging in, we migrated to the wordpress survey page . But before entering the wordpress page, the wordpress side needs to check whether the user is logged in through a cookie. Go to the survey page if you have logged in, otherwise jump to the login page.
So I want to make a filter on the wordpress side and want to call before accessing the page. But I don’t know where to write the code to call it .(Or just use the fiter name already defined in wordpress)