In my application, i have one form. Now if user is in front end i want to display the title but if he is in back end i do not want to display it.
I do not want to check it based on user role.
In my application, i have one form. Now if user is in front end i want to display the title but if he is in back end i do not want to display it.
I do not want to check it based on user role.
Share Improve this question asked Mar 13, 2012 at 5:27 Ajay PatelAjay Patel 6584 gold badges16 silver badges27 bronze badges 1- This answer seems to address your question: wordpress.stackexchange/a/343592/43252 – MastaBaba Commented Mar 5, 2023 at 18:03
2 Answers
Reset to default 36Use is_admin()
. It checks if you're viewing an Admin page, means the backend.
Use is_admin()
to check if the the current page is an administration page. Despite its name this is not a user role check. It returns always FALSE
on front end, no matter what role the user has.