So i followed a tutorial to install wordpress offline in xampp. It's up and running but login doesn't seem to be a full admin. It says i don't have sufficient privileges when trying to install a plugin. And when trying to make a new page it only offers 'submit for review' I used phpmyadmin to insert a another user with user level 10 and wp_capabilities a:1{s:13:"administrator";s:1:"1";} but it still says i don't have the privileges. Any help? EDIT I just …
I have a few sites in a network. I don't want the site administrators to manage things like network plugins, but I would like them to be able to edit profiles of all network users, not use those on their site. At the top of the /wp-admin/network/users.php file is this: if ( ! current_user_can( 'manage_network_users' ) ) wp_die( __( 'You do not have permission to access this page.' ) ); How can I grant site administrators priviledges to manage_network_users without …
By default Wordpress private posts are visible to all admins right. But on this build for some reason private posts are only displaying (on the page) to the admin that created it. I'm perplexed. I need all admins to see the private posts displayed. This is a custom post type using a custom query so maybe there's something I did there. // query upcoming webinars - Sort by date from date Picker $args_upcoming = array( 'cat' => $thiscat_id, 'numberposts' => …
In my WordPress installation (4.9.8.) the editor role isn't allowed to edit the privacy page. It would work with following in my functions.php: $role_object = get_role( 'editor' ); $role_object->add_cap( 'manage_privacy_options', true ); $role_object->add_cap( 'manage_options' ); // this needs to be active in order that before cap works But now the editor has lot more rights than just editing the privacy page. Is there another way to grant access to the editor user role with some lines of PHP code? As …
I am trying to assign privileges on posts on a per post basis. Essentially, I have a custom post type which have authors. They can edit their own posts. I then have another role, which should be able to edit a subset of those posts bases on a custom field or taxonomy. I can filter out the posts that appear in the backend using pre_get_posts, and applying a query based on the custom field. However I need to limit specifically …
I'd like to disable access to posts in the back-end/Admin from a user that doesn't have the privilege to view those posts. This will function similar to the Author role however this "privilege" is controlled by an ACF User relationship field and not by a WP Core role or privilege. One level of complexity deeper, the User relationship field is actually pointing to a parent/grouping custom post type that is then tied to the children post elements I'm attempting to …
The short installation instruction for WordPress ("5 Minutes") state that: Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and modifying it. While setting up a new blog professionally I was wondering how that maps to what the MySQL database user privileges/permissions configuration offers me: Data: SELECT, INSERT, UPDATE, DELETE Definition: CREATE, ALTER, DROP Extra: INDEX More: LOCK TABLES REFERENCES CREATE TEMPORARY TABLES CREATE VIEW SHOW VIEW CREATE …
I am trying to add a plugin to a client's site. I can see everything in the dashboard except the plugin page and users pages. I can install a plugin and see my own profile but cant see other installed plugins or other user profiles in the dashboard. If i access the pages via direct link, i get an insufficient privileges to access this page error. Any idea? As requested... The values of my account in phpmyadmin: wp_capabilities = a:1:{s:13:"administrator" …
So i came to three posible solutions to this question and can't decide which is better. What is your opinion? First solution: if ( ( in_array('administrator', userdata('role')) || in_array('editor', userdata('role')) ) == false) { add_filter('show_admin_bar', '__return_false'); } Second one: if( ( current_user_can('editor') || current_user_can('administrator') ) == false ) { add_filter('show_admin_bar', '__return_false'); } Third one: $allowed_roles = array('editor', 'administrator'); if( array_intersect($allowed_roles, userdata('role') ) == false ) { add_filter('show_admin_bar', '__return_false'); } User data function: function userdata($userdata){ $userinfo = wp_get_current_user(); if ($userdata == …
I have purchased few plugins and they work fine, but one existing plugin doesn't work. The plugin developer telling: refund or provide admin access. How to handle such requests? Create a special user with some admin rights just be able to work on plugin directory?
I essentially want password protected/private pages/posts in WP to work as they currently do, but completely disregard the functionality for certain IP addresses. I've looked into filters/actions and don't see anything that seems promising, again I would prefer to do this without creating a specific category or anything outside of the current functionality of this in wordpress. Thanks!
Is there any way I can forbid a contributor to view draft posts? Right now any contributor can view my draft posts and even edit them (however their edits must be approved by administrator first).
I wonder if it is possible when adding a new role add_role() I can assign to it a privileges to add, edit, delete posts of a custom type. To be specific. I want to add a role 'volunteer coordinator' that can edit, add, delete events. Event is a custom post type. The things that I managed to do is to assign privileges as a editor but this only works on the posts and the pages but not a custom posts …
It seems strange to put a redirect in a template page, because so much of the page has already been built by the time you reach a custom page template. I'm wondering what is a good action hook to use where I can test whether the user's logged in, and whether they're on a particular page/category/etc and wp_redirect them if necessary?
When you create a new Wordpress site, the first user created is user #1 and given the Administrator role. Is there anything special about user #1 that would make it unwise to delete it? (Assuming that there were other users with Administrator role.)
I was under the impression that only admins/editor roles can approve comments however our authors are able to do so as well on their own posts. I want to disable the ability for an author to approve comments on their posts. Under dashboard settings > discussions > Before a comment appears-- Selected: Comment must be manually approved Unselected: Comment author must have a previously approved comment
I'm using the Newsletter plugin and would like to make it accessible to author users. Is it possible to do so? If there's no solution for this I'll edit the editor role to make it a new author role.
I am following "Write your own plugin tutorial" and I made it, activated it, added it to settings to have it's own plugin page but upon trying to access that plugin page I get above message saying that "I do not have sufficient permissions to access this page" even though I am logged in as admin and I did chmod -R 777 to wordpress directory?? What else could it go wrong? Plugin code follows: oscommerce_importer.php <?php /* Plugin Name: OSCommerce …