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.
You must be logged in to post a comment.
Use
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 alwaysFALSE
on front end, no matter what role the user has.