Articles of content restriction

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 word press admin. But how can i restrict the access of that role ?

Is it possible to restrict files from your wordpress uploads (not logged-in users or guest)?

I want to restrict the uploads and only be visible to logged-in users. But the PDF’s or images files always are visible and also to un-logged users. You can imagine that this WP would be completely private. Only for logged-in users. Is there any way to fix that? Can be solved without .htaccess file? In […]

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?

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 can create and modify, but 3 of them need to be locked so that only admins […]

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 ) ) ) { ?> <?php With this same array of pages, I need people to be logged in to view them. […]

How prevent direct access to PDF file

I am trying to protect a pdf file from direct downloading. I am using the PDF Embedder plugin to embed the PDF file – a first step into preventing its download. Then with JS I have disabled mouse right click, CTRL+ shortcuts. I inserted a redirection when the browser detects JS deactivated. I have found […]

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 be registered. So the process should be as follows: Are you registered? 1.1. Type your email […]

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 %{REQUEST_FILENAME} ^.*(mp3|m4a)$ RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC] RewriteRule . – [R=403,L] except how would I convert these .htaccess rules to […]

Restricting page access

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 page I am trying to restrict is based on a page template that itself has some hard coded […]

One Site as a part of Multisite to be hidden (Un-published) from Public?

Lets say i have some sub-domains under one single Multi-site: <—- hide from public access (Protected) How do i HIDE the one site only, from the public access. (or) Put the site as something like Unpublished (or) dark site? ** HIDE means prevent the “Public” users to see the site. (or) Something […]