The tag has no wiki summary.

learn more… | top users | synonyms

15
votes
3answers
327 views

How to enable suggested edits?

I like the idea of enabling any user of my website to suggest edits to a page. Much like the edit system on Stack Exchange but different in that anyone should be able to edit, not just registered ...
8
votes
3answers
13k views

Allow member to have access to custom post type only. Permission to only edit their own posts

OK I'm looking for the best way to attack this. I'm very comfortable with PHP and making custom post types with custom meta fields in WordPress. Here is what I'm looking at doing: User registers ...
8
votes
6answers
2k views

How to restrict attachment download to a specific user?

I have a very specific use case where the site built for a lawyer and each of his clients can login to their own 'specific page/portal' (custom post type) without the ability to access wp-admin etc. ...
6
votes
2answers
7k views

How do I create a custom role capability?

I wish to create a custom capability for accessing the interface of my plugin. Should the plugin manage adding this capability to all the administrator accounts on activation? If so: Does WordPress ...
5
votes
1answer
410 views

Disallowing Users of a Custom Role from Deleting or Adding Administrators?

(Moderator's note: The original title was "Custom User Role Restrictions") A project I am working on requires me to create two new user roles - one for the owner of the website and the other for ...
5
votes
1answer
1k views

Filtering the Admin Comments List to Show Only Comments from the Current User?

In the Comments page (/wp-admin/edit-comments.php), every logged in user can see all the site comments. I'd like the users to see only his/her own comments and the comments that are left to ...
5
votes
3answers
1k views

Allowing specific users to only add posts using certain custom taxomy terms

I was searching through the forums, but I can only find slightly related issues. This is my problem: I'd like to assign some editors the capability to only add posts in a predefined term of a custom ...
4
votes
3answers
318 views

Is WordPress' is_user_logged_in() secure?

I've been wondering about this for a while. Is the following if statement safe enough? Is it easy to break through the code and get access to the content when not logged in? <?php if ( ...
4
votes
1answer
926 views

Post list based on the user that is logged in

I've been all over this site and google, and the WP codex looking for an answer to this one. I know it's out there, and I know it's easy. Maybe has something to do with user_nicename, but I just can't ...
4
votes
1answer
155 views

Theoretical Multi-Server WordPress Setup with Shared Users

The organization I work for would benefit if we could take the existing WordPress installations that are located on several (~5) different servers and be able to use a universal database with the ...
4
votes
1answer
3k views

How to assign specific users the capability to edit specific pages / posts / custom post types

I'm trying to implement what seemed like a relatively straight forward idea, basically I am building an access control plugin to control viewing and editing of a custom post type (in this case ...
4
votes
1answer
846 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 ...
3
votes
4answers
5k views

How to restrict access to uploaded files?

I have a restricted area on a website that can only be accessed by logged in users. For that I created a page template with a 'current_user_can()' condition. My problem is that the documents attached ...
3
votes
2answers
3k views

Allowing an email as the username?

Is it possible to allow people to utilize their email as their username?
3
votes
1answer
133 views

Make A WordPress Page Accessible To Admins Only, Redirect Other User Roles

I need to redirect logged-in and non-admin users, from page with id 172, to the home of the website. Note that users that are not logged in can actually see the page. add_action('admin_init', 'xyz'); ...
3
votes
2answers
2k views

How can I hide a category from Contributors in the edit/add new post screen?

I have a situation where I need to hide a specific category and it's children from users who are logged in as Contributors. I don't want them to see this category and it's children in the categories ...
3
votes
5answers
1k views

Moving wordpress from localhost to server throws admin panel access error?

I've a working version of wordpress in localhost and i tried to move them to the remote server. As i've another wordpress installed in the same server and tried to rename the current tables to the ...
3
votes
1answer
338 views

The 'user_has_cap' hook seems to take two page loads to trigger

This question relates to another question I asked recently (http://wordpress.stackexchange.com/questions/29009/how-to-assign-specific-users-the-capability-to-edit-specific-pages-posts-cus/), the ...
3
votes
3answers
376 views

Multisite Independent User Base

I run a multisite blog farms with all blogs having a consistent functionalities (theme and plugins and some basic content), but independent from each other in terms of user database. I would like to ...
2
votes
2answers
233 views

What is the difference between “create_users” and “add_users” capabilities?

The codex lists both create_users and add_users under roles and capabilities. Does anyone know what is the difference between these two?
2
votes
6answers
2k views

Website Visible only to Registered users

How can I disable access non registered users? If the user is not logged in I would like to redirect them to a custom registration/login page. Is it possible this using below code as I dont want to ...
2
votes
5answers
360 views

How to add another user to this remove_menu function?

Pretty self-explanatory. How does one add another user to this function for functions.php, i.e., user2, who will be shown different menu items than user1? I tried adding another ...
2
votes
2answers
2k views

How can I hide media library images from general users?

As an admin I really like the features and functionality of the WordPress 3.5 media manager. With a multi-user site however all users can see all images in the media library - whether uploaded by ...
2
votes
1answer
83 views

Restrict certain posts from being sent to the feed subscribers

Is there any way to restrict certain category’s posts or certain posts from being displayed into site default feed after published? I’m asking this because I don’t want few specific categorie’s posts ...
2
votes
2answers
267 views

How to show a category post to a specific registered user

I'm working a private blog and I'd like to know if this can be done with any other plugin or any other way: Lets say we have 3 categories: CA, CB and CC, and 3 users, UA, UB and UC, all of them can ...
2
votes
1answer
2k views

How to manually activate user in dashboard only by admin

I'm looking for a function that allows admins (only) to activate new users. When a user registers he have to be approved by the admin before he gets access to log in. Does anyone know how I can do ...
2
votes
1answer
252 views

Add user capability and check against it

I just realized the following: // Call the current user info global $current_user; // Add a capability // and set the 2nd argument ($grant) to false $current_user->add_cap( 'some_cap', false ); ...
2
votes
2answers
6k views

Allowing users to edit only their page and nobody else's

We currently have about 50 pages, each of which I want a user (eg, bob, rob, smith) to be able to edit only 1 page. For example, bob & smith each have their own page. I do not want bob to be ...
2
votes
3answers
533 views

Making a Custom Post type only visible to non-users via a specific link

I am working on creating a small web-app with wordpress as the framework. It allows you to input a customer and in turn sends an email to the customer with a link back to the website in order to ...
2
votes
1answer
126 views

Restricting access to content

I'm developing a functionality to let only customers and doctors have access to exam results. But i'm not so sure about the strenght of my code in securing view only to those authorised. I've gotten ...
2
votes
2answers
142 views

Add a wordpress blog to my website having users

I have a php/mysql based site with users segregated into different groups... i want to add blogging system to it so that each group has its own blog which can be authored by users who are designated ...
2
votes
1answer
424 views

How to inhibit dashboard and profile management access to normal users?

I am developing a site using Wordpress, phpbb3 and WP phpbb Bridge. Users have to manage their profile through phpbb3 and I would like to inhibit normal users access to page mysite.com/wp-admin/ . ...
2
votes
1answer
1k views

authenticate user without password from email activation link [duplicate]

I have my own activation mail for new users that are added via a plugin in the wp backend by an admin. The user is also added as an author to a post and I want him to activate the post (which will ...
2
votes
1answer
734 views

User Access Manager plugin

I have updated the UAM plugin from 1.0Beta2 to 1.1.4 (latest at the moment) and it stopped working. When I select a group to have rights for an article - the selection is not saved. I checked with ...
2
votes
0answers
61 views

Allow anonymous user to access Themes Customizer

i create a themes and use themes customizer, is there any way i can give anonymous user access to themes customizer without ability to save it? it will be very convenience in term of user experience ...
2
votes
2answers
540 views

How to programatically change username (user_login)?

As in the title, how to programatically change user's login? I wanted to use wp_inser_user function, but it appears that when updating current user, it doesn't change his/hers username. Should I use ...
2
votes
1answer
411 views

How can I have different groups of editors only allowed to edit certain parent+subpages?

I've tried a bunch of different plugins, including Role Scoper, Advanced Access Manager, User Account Manager and more, to accomplish this but can't seem to get it working right. Basically, the ...
2
votes
2answers
260 views

Restrict access and display for categories

Is it possible to choose specific categories that will only be displayed to logged in members? I tried to find a plugin or a PHP solution that does that but could not find anything that was still ...
2
votes
2answers
561 views

create a back-end wordpress content submission using custom post type

I have a previously created thread here, but was recommended to make a new one: I need basic help with custom post types. Basically here's my project: I have to create a back-end wordpress gui user ...
2
votes
2answers
1k views

wp_update_user not updating

In desperation I am asking for help in this forum too - if someone (ANYONE!) could take a look a this post and see if they could help I'd be eternally grateful ...
1
vote
3answers
7k views

Remove Custom Post Type menu for non-administrator users.

I've been researching this all day and haven't come up with much results. I want to restrict who can see my Custom Post Types by User Level (or some other way). So if the person logged in is not an ...
1
vote
2answers
754 views

How to check if user is in back end?

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.
1
vote
2answers
148 views

How to get the ID of the currently logged in user?

I want to get the ID of the currently logged in user. I've found the function: get_current_user_id which seems to be working, however I'm not sure what 'current' means in this context. Meaning if the ...
1
vote
1answer
572 views

Edit Post VS Custom Form

I have a blog which relies heavily on user generated content. I would like my users to be able to create posts, but the posts must only have specific fields: title content an attached image two ...
1
vote
3answers
2k views

Add new media uploader at frontend for wp 3.5+

I create a form for user to submit content from the frontend. The only problem is I don't know how to handler the image upload. So, I want to know how to use the WP media uploader in the frontend. ...
1
vote
1answer
214 views

How to redirect specific post type with user role

I have created custom post type Books in my functions.php. Now I want to redirect every user (assigned with editor role). When they click to Dashboard it goes to this page: ...
1
vote
1answer
100 views

Is there an existing capability to allow editing of only pre-existing pages? If not, a good way to implement this?

I'm working on a setup for which I need general users to be able to edit a specific list of pages, but not create any new ones. Looking through the Codex, I don't see anything that will come close to ...
1
vote
1answer
873 views

pre_get_posts Remove posts based on meta value with 'post__not_in'

I am attempting to alter the query of pages where the post meta value of _members_access_role does not meet that of the currently logged-in user. Here is what I have so far: // Get all posts with the ...
1
vote
2answers
5k views

Limit access to posts/pages by user roles

I'm looking for a way to protect content by user roles. Example: you have to be registered to view posts (frontend). If a user is a subscriber he can read post 1, 2 and 3, but if the user is a ...
1
vote
1answer
1k views

How can I get multisite primary blog (url or path) for current user?

In a multisite setup, when users are visiting a blog/site that there are not a member, I would like to display a link to "HOME" that takes them to their "primary" blog. I know how to determine if a ...