The tag has no usage guidance.

learn more… | top users | synonyms

10
votes
6answers
4k 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. (...
9
votes
1answer
8k views

simple solution for restricting access to (some) uploads/downloads

Initial Situation For a site I'm setting up I was looking into the whole field of securing uploads/downloads and restricting access to them based on user roles/capabilities. Of course I have read ...
5
votes
3answers
4k views

User redirect to destination URL after login

Scenario: if user not login, user redirect to customize login page and redirect again to destination page after login. I don't use a function or plugin. This code to restriction page: if (!...
4
votes
1answer
131 views

Loading posts associated only to the logged in user on recent posts page

Dear Wordpress Captains, I've stumbled upon a problem and I am seeking for assistance. What I'm trying to create is a customer portal where the logged in user will only see the posts that are ...
4
votes
1answer
78 views

Hiding posts from non logged in users

I wish to hide certain posts for anyone that is not logged in. I tried the Restrict Content (RC) plugin but that did only hide the content of posts, i wish to omit the post completely. Using RC as a ...
3
votes
3answers
7k views

How do I display a user specific content?

I have a site that displays the content only to registered users. Most of the content is available to all the users, but some of it is user specific (i.e. all users have that page, but each sees a it'...
3
votes
2answers
62 views

How can I limit functionality in one version of a plugin?

I am busy writing a plugin with a free version and a paid, Pro version. For our initial release of both versions, I want to keep things as simple as possible, so I would rather defer using a strategy ...
2
votes
1answer
129 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
1answer
981 views

Correct Post Count ( All | Published | Drafts | Pending | Trash ) for Custom Post Type when restricting to view own posts

I want to restrict users in wordpress to view their own post and media items only. Following the steps given in the below link I have developed the plugin to restrict users to view the own posts and ...
2
votes
1answer
292 views

Restrict access to post if it is currently being edited

On a platform with many Editors, the problem that I am experiencing is that two editors proofread the same post simultaneously (and disregarding the warning notice about someone else currently editing ...
2
votes
2answers
197 views

Restrict access to specific users

Is there a built-in function that would allow me to restrict access to registered users until the official launch date in Wordpress 3.4.2? The blog is self-hosted.
2
votes
3answers
879 views

Allow access on a page to just only a specific member

I am trying to create a membership site on WP where each members will have access to only specific pages created for them. I mean just a member is allowed to view content on a page while that page is ...
2
votes
1answer
499 views

Restrict post edit/delete based on user ID and custom field

I've been able to prevent deletion and editing of posts based on user ID and page ID however, I need to restrict access to editing and deleting based on a custom field. Not sure how to go about doing ...
2
votes
1answer
621 views

Wordpress stripping html and script tags from some admin users on save

When I add content to a page as the original admin user, I can past in the following code and it saves fine (old google search set up by another user): <form action="http://www.google.com/cse" ...
1
vote
1answer
527 views

Removing Wordpress Plugin Menu Item for a specific user

I want to remove certain dashboard menu times for a specific user. Now this menu consist of plugin menu items as well. One particular plugin I want to hide from the user is Contact Form 7. Here is ...
1
vote
4answers
541 views

WP Cron doesn't save <iframe> or <object> in post body

I am using wp_cron to auto grab posts from a remote website and save them in my wp db. NOTICE! I am executing my code from my plugin, not from my template functions.php or somewhere else. I have my ...
1
vote
1answer
346 views

Restrict access to the Trash folder in Posts

I want to restrict users from deleting posts permanently. How do I restrict access to the Trash folder in Posts? This is the only page were the users can delete their posts permanently. The only ...
1
vote
1answer
416 views

Restrict other Admins from using Editor in Admin Panel

I am running a WordPress website. I want to assign other users roles like Admin, Editor, etc. I want them to be able to install plugins, themes, delete them, etc. The only thing I don't want them to ...
1
vote
1answer
627 views

How to restrict the editors from viewing/editing pages created by admin?

In the backend, how can I restrict the editors (user with editor role) from viewing/editing pages created by admin (and/or by administrator role)? I know that the editor role in WordPress have "...
1
vote
1answer
35 views

Restrict the user access in multi site for non-assigned blogs

What is the better way to restrict a user of any role being logging into a blog of wordpress multisite network if he/she is not assigned to that particular blog as a user even though he is an ...
1
vote
3answers
988 views

Page Restriction and Redirect for Particular Levels or user

I am planning to have a page restriction and redirect for the particular level of users, but I dont have any idea how to implement that. Here's an example of what I want to achieve I have a page ...
1
vote
1answer
92 views

How do I log out users from a restricted page if they are already logged in on another device? [closed]

Hope someone can help me. My client and I are down to the wire on this project and I can't seem to figure out a solution for this problem. I'm currently using WP Bouncer to limit the amount of ...
1
vote
1answer
36 views

Are exclusive taxonomy terms possible?

I'm creating a site that requires users' content to be exclusive to the user. Ideally I would like this to extend to taxonomy terms. Example: I have a taxonomy "Clients" UserA creates the term "My ...
1
vote
1answer
528 views

Remove admin menu

Ho do you remove admin menu items and dissable acces for users below admin ? The right way... // 1 - Remove Menu Items function my_remove_menu_pages() { if ( !current_user_can( 'administrator' ) )...
0
votes
1answer
1k views

Taxonomies, restrict editing and creation of terms?

Can I stop my client from adding terms to a certain taxonomy? So that I set up a fixed amount of terms, and that´s what they get to choose from. Can I remove the menu item for certain taxonomies in ...
0
votes
1answer
23 views

How do we restrict a user to see a field in a post without registration,

How do we restrict a user to see a field in a post without registration, after registration the user will be able to see the link. I have a project in which I have created a post from an excelsheet ...
0
votes
1answer
207 views

How to properly print a 404 error without redirecton? (i.e. keeping the current URL)

There are some pages on my BuddyPress install that I would like to hide by printing a 404 error. With the help of the following question: Redirect Restricted Page to 404 I came up with this code: ...
0
votes
2answers
851 views

How to allow registered users to submit the form only 5 times per day?

Question Is there a way that my registered users (if they are not the form is hidden so I don't need that) are restricted to submit the form more than 5 times per day, or 20 per month or whatever ...
0
votes
1answer
42 views

How restrict video to be open on direct url hit

i have client website of premium E-learning videos on wordpress. i have uploaded all the videos(MP4) in wp-content/uploads directory. i have problem since it is a premium video i want it such a way ...
0
votes
2answers
73 views

How to force acceptance of site terms on first login?

I want to force users to accept the terms and conditions of the site when they log in for the first time. I found a couple plugins that would show the terms, but they don't prevent you from ignoring ...
0
votes
2answers
199 views

Restricting page access [closed]

I need to restrict access to a page in a wordpress site for everyone but registered users. I have looked at a couple of plugins, and although they work well, they don't quite fit my solution... The ...
0
votes
2answers
160 views

I restricted wordpress by logged users. It's possible exclude a page?

Here is my code for restrict my wordpress site: function restrict_access_if_logged_out(){ if (!is_user_logged_in() && !is_home()){ $redirect = home_url() . '/wp-login.php?redirect_to=' ....
0
votes
1answer
278 views

Limit file downloads to logged in users (WP + Nginx)

I am looking for a way to restrict access to mp3 files on my site to logged in users only. The approach listed here sounds pretty much like what I need: RewriteEngine On RewriteBase / RewriteCond %{...
0
votes
2answers
1k views

Downloadable content only for subscribers?

I'd like to use WordPress to set up a whitepapers site. Any user can check the main site with a list (blog format) of white papers available. But if a user wants to download any whitepaper, he has to ...
0
votes
1answer
29 views

setting a specific home page for logged in users

After googling, I have a piece of code to set a specific page as home page in wordpress. The code says, add_action('init', 'loginCheck'); function loginCheck() { if (is_user_logged_in()) { ...
0
votes
1answer
33 views

Requiring login for specific pages

I have 2 lines of code in my header.php file that exclude the header from an array of pages. The code looks like this: <?php if ( ! is_page( array ( 3599,3653,3684,3732,3737,3758, 3769 ) ) ) { ?&...
0
votes
1answer
22 views

How can I lock specific posts (cpt's) from editing by anyone other than ADMINS

To be 100% clear, this has nothing to do with the front end of the site. I want to keep all users other than Admins from editing a few specific posts. The posts are a CPT that the editors/admins ...
0
votes
2answers
107 views

How can I set a maximum allowed post size and number of posts submitted?

How can limit the size of posts that authors can create on my WordPress site and the number of posts they can create?
0
votes
1answer
378 views

How can I restrict a custom WordPress role access to only a specific plugin?

I created a custom plugin . I want to add some admin side users to use that plugin. I created a specific role . But i want to restrict the those users/role access only that plugin not the entire ...
0
votes
1answer
73 views

Custom content before post content

I am using this code to insert custom content after title and before content. How can i limit it to only "post" not pages and custom post types. function theme_slug_filter_the_content( $content ) { $...
0
votes
2answers
269 views

Require re-login when logged-in user attempts to access restricted page

I need to restrict access to certain frontend pages, based on a user_meta field. All works fine, except when the user is already logged in but with the wrong credentials. In that situation I would ...
0
votes
1answer
396 views

Simple Math Quiz or Captcha to hide whois query form

I have a whois form in my site that enables users to query for domain name availability and if available gives them the option to request for registering it. The whois form is inserted via shortcodes. ...
0
votes
1answer
57 views

How to restrict a plugin from certain pages without editing its core

I've run into a problem using two different twitter plugins. One is for login and one is for displaying a twitter stream. The issue is they both use Oauth so I get a re-declare error when trying to ...
0
votes
1answer
71 views

Prevent certain subscribers from seeing specific taxonomies (changes frequently)

I've created a taxonomy (let's call it tax). I need to limit what a user can see. The users can't edit anything, just read the blog. If it was just setting what they could see once, I'd probably just ...
0
votes
0answers
21 views

htaccess set public pages and then allow from specific referer

I've done a lot of searching already and I have read the full documentation on .htaccess. However, I don't seem to get some restriction rules to work for my WordPress website. I'll explain the ...
0
votes
0answers
33 views

Restrict acces to chosen pages

So i'm restricting access to a few pages based on some conditions: example: function restrict_wp_admin() { if (is_admin() AND !current_user_can('manage_options')) { global $wp_query; ...
0
votes
0answers
47 views

Return 404 on chosen pages like /wp-admin/

let me start by saying i use the theme: x. i've jumped onboard in trying to restrict access to the wp-admin page for non-logged-in users and non admin users. first i tried with the code below: if (...
0
votes
1answer
45 views

Using a page-template to restrict access based on IP (Frontend)

I've found this advice for restricting the access to a whole WP site via adding a function to the init hook that holds a whitelist of IP adresses. I tried to rewrite that to the condition that only ...
0
votes
1answer
28 views

Restrict content even to specific user

I am developing a membership site that will allow members to access old issues of a magazine produced by a charity. I have it working up until a point, I can restrict access to each download to the '...
0
votes
0answers
33 views

Restricting access to specific site in multi-site platform

I am working on a multi-site platform and I need to allow only certain user-role (i.e Seller) to access specific site. For example: everybody can access domain.com, but I need to set a rule so that ...