Linked Questions
11 questions linked to/from If the current user is an administrator or editor
5
votes
3
answers
9k
views
Only allow administrators and editors to access wp-admin
I am trying to restrict access to wp-admin so that only administrators and editors are allowed. At the moment I am using this function:
function restrict_admin(){
//if not administrator, kill ...
0
votes
1
answer
4k
views
Does jQuery/Ajax send cookies when using the rest API or do I need to somehow add them?
I've run into an odd situation with user capabilities. I have set up a rest endpoint on my local computer and am the super admin. The rest endpoint is called and the first thing it does is see if ...
1
vote
1
answer
2k
views
Hide from specific role the top admin bar new button
How can I hide at the top admin bar the "new button" which is a shortcut to publish new posts, new pages etc.
I will hide from a specific role, but being new to WordPress, I am looking for the ...
0
votes
1
answer
2k
views
How do I apply/target CSS to a specific user role or roles?
How would I apply some front end CSS to a specific user role or roles?
0
votes
1
answer
2k
views
How to restrict access to a page?
I am developing a page in WordPress. In functions.php file I have this:
function feed_add_notmusa() {
add_feed('mypage', 'mypage_function');
}
function mypage_function() {
get_template_part('/...
1
vote
2
answers
1k
views
Redirect already logged in users away from a page to a specific page base on user role
I'm trying to accomplish this simple task through different plugins, but I can't find the right one for different reasons.
I have a Login Page with a login form. When user logs in, he's redirected to ...
8
votes
1
answer
620
views
Is it possible to filter comments in a post so a user can only see the comments they have written?
I am relatively new to wordpress, and coding, and I am working on a site where the users will need to leave comments for certain posts, but the person I am building the site for wants the user to only ...
0
votes
3
answers
1k
views
Change logo url based on WP user role
I want to be able to change the WordPress default logo url (not the logo image) based on the user role. The image/logo will remain the same, only the url will change. Any assistance or ideas will be ...
1
vote
1
answer
152
views
Do not execute If User is login as Administrator or any Specific Role
How can I not execute some <script> </script> if the user is an administrator or any specific role?
Basically I need to do something like this:
<?php if( !User( 'Administrator', '...
0
votes
0
answers
155
views
How to hide Submit a deal button on redeal aka rehub theme for non-admins?
What is the easiest way to hide "Submit a deal" button on redeal aka rehub theme for everyone but admin?
I am new to wordpress, not able to find anything in documentation of rehub
but I read ...
0
votes
1
answer
114
views
Show modal only to some roles
I would like to open a modal/popup on my homepage but only to specific users using their roles.
I have a plugin (CP Poll) and I would like only some people to see it. It gives me a shortcode. For ...