Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [content-restriction]

The tag has no usage guidance.

1
vote
1answer
52 views

Does pre_get_posts affect REST API responses?

I'm trying to limit the content that is returned via REST API routes to only contain content published by the current logged in user. I'm trying to do this using pre_get_posts which works fine when in ...
0
votes
0answers
22 views

Valid Wordpress html elements

I'm working a plug-in on the admin side of it. I would like to show a html listbox element on the form. But no matter what I try, it will only show 1 entry. It is scroll-able, which I want when it ...
0
votes
0answers
6 views

Restrict upload size (storage) by membership status

Is there a way, a plugin, to restrict some members in MemberPress to upload a certain amount of Mbytes? Thanks alot! neuhaus3000
0
votes
0answers
31 views

Restrict Access to media files

I'm making a video streaming website for paid members like Netflix. I uploaded files http:// .. wp-content/uploads/_pda/videos/sample.mp4 I want to hide or redirect if users try to access this url/...
0
votes
0answers
13 views

Groups plugin: Specific users can edit specific pages

How I can allow only specific users to edit specific pages? With code or the Groups plugin (by itthinx), Im not allowed to use another plugin. Is that possible? I ended up to this solution: ...
0
votes
1answer
28 views

Restrict access if logged out except for homepage

I want to retrict access to my whole wordpress except for the homepage and one other page. The problem I found is that the other page is accessible but not the homepage. My wordpress installation is ...
0
votes
1answer
99 views

How to show private pages based on a user's role?

For example. User "Mary" should be able to view to the private page "marys page" after logging in, "Tom" should be able to view the private page "toms page", etc I created new users and am using the "...
0
votes
1answer
20 views

Hide posts of particular category for everyone except of particular user group or role

I am looking for a plugin which allows to see posts to particular user group (or role) only, post’s names included. I want to hide even a hint of presents of these posts from everyone except of ...
1
vote
0answers
24 views

Use an activation code to change a role [closed]

Wonder if you can help me. I'm making a website based on accounts and a subscription for content control. At the minute, the way activation of a paid account works, is the user buys a subscription via ...
0
votes
0answers
43 views

wp_get_archives() --> only show posts, a user is allowed to read?

i'm trying to build a navigation in which all posts are listed in a sidebar (all the time) -> but only the ones a user is allowed to see. i tried to do this with wp_get_archives() which gives me a ...
0
votes
0answers
12 views

How to allow members access while keeping links to pages from being share-able?

I am working updating a 10+ year old website for a small residential community. Its front page-not hosted on WordPress--requires community members to log in with their own (unique) password to view ...
0
votes
0answers
19 views

Plugin for Content Restriction: Individual NAV for each User (contains ordered & segmented list of all posts he's allowed to see)

I'm unsure about the right way to realize one of my next projects and would love to hear some of your thoughts. I'm quite sure that there is already a plugin out there that contains a solution to my ...
0
votes
0answers
220 views

How to block access to a folder inside of wp-content for non logged in users?

I have a custom folder inside of wp-content where I'm uploading media. I need to block direct access to this folder unless the user is logged in. Is there any way to do this? I've searched but have ...
0
votes
0answers
18 views

NGINX config to block content from internal subsites being downloaded but not the main site

I have a Wordpress Multisite network setup and I am trying to block non-registered users from being able to download PDFs and other documents from direct link to the internal sub sites. To do this, I ...
-1
votes
1answer
26 views

I want to restrict a page for subscriber and contributor

Well, I want to restrict a page for subscribers and contributers and want to redirect them to another page. But how can I do that?
-1
votes
2answers
1k views

How can visitors redirect wp-admin to the homepage?

How can visitors redirect wp-admin to the homepage? My site details: 1. I used BuddyPress; 2. Users can sign up and login via BuddyPress; 3. User role only Admin and Author; Needs: 1. wp-admin only ...
4
votes
1answer
72 views

Create a USERNAME and PASSWORD protected WordPress page

I have to create a private page, that will be only visible to users that have a username and password. I was able to create a username and password protected page, now the users are subscribers so by ...
0
votes
2answers
314 views

How to restrict an admin page, if the user is not superadmin?

I use the All In One Seo Pack on my multisite, but this plugin have admin pages, what is not fall under the rule what restrict the plugin pages from my users, so I using the remove_cap( $cap ); about '...
1
vote
0answers
34 views

Restrict certain character combinations in username during registration

I am trying to restrict a certain combination of characters in a user name while they register. I have restricted user names to numeric characters only, but now I am not getting a way out to restrict ...
0
votes
1answer
44 views

Should I setup frontend-only users as CPT or use a plug-in?

My client would like to have a downloads page with both public and client-specific items. I'd considered created a CPT of Client and creating relationships to Download items, or assigning categories, ...
0
votes
2answers
29 views

Hide top admin panel for non admin and non editors

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', ...
0
votes
1answer
62 views

How to restrict access to a single for users I've authorized? [closed]

I have a WordPress site which doesn't require any login or user registration. However, I have just created a page on my website which I would like to restrict to users I have added myself. I would ...
0
votes
1answer
72 views

Wordpress Front-End user restricted taxonomies

Hi I need some info on how to achieve the below senario. I have a post type called "PRO". I have a custom taxonomy for above post type called "Pro Categories". Admin will create users in the backend ...
-1
votes
2answers
1k views

Restrict content based on buy woocommerce product

How i can restrict portion of post/page content when user bought specific product? for example: some content ... [wcm_restrict product_id="5"] this content only show for users ...
1
vote
1answer
456 views

not logged in users can't submit form

I embedded a Mailchimp newsletter registration using the mailchimp-plugin, which works just fine for logged in users and also on other websites of mine. But on this page, users who are not logged in, ...
0
votes
0answers
47 views

Hide restricted pages from search results

I have User Role Editor Pro set up on a multi-site network. I have a user group called "support", and several pages are set up so that only users in the "support" group can view them. These pages ...
0
votes
1answer
15 views

How to use url formatter with integer

I have this below code to prevent users from deleting the quizzes. if( in_array( $pagenow, array('admin.php') ) && ( $_GET['page'] == 'wpProQuiz' && $_GET['action'] == '...
1
vote
0answers
175 views

How to show post content before read more tag (excerpt) for password protected posts?

WordPress password protected posts or pages show by default the text "There is no excerpt because this is a protected post.", instead of the post excerpt. The corresponding code is in wp-includes/...
0
votes
1answer
15 views

Segregating content in a blog for 2 different readers

I'd like to have a blog that covers two topics, mathematics and interactive fiction. However, because the mathematics is more serious, for my job, I'd like to hide the interactive fiction when the ...
0
votes
1answer
434 views

Is it possible to restrict access to specific pages in the admin area based on the page slug?

I would like to restrict access to specific pages in the admin area to only the admin role (and / or specific users). There appears to be no shortage of answers on how to do this using the page ID's - ...
0
votes
1answer
779 views

Is it possible to restrict viewing of category PAGE to logged in users only?

I want to block the category page so that only logged in users can view the category page. I'm not talking about the posts in the page, I'm meaning the actual page view. For instance, if I have a ...
0
votes
1answer
329 views

Restrict Login Subscriber users from accessing frontend

I’m running a private site login users have access to the front-end using [My Private Site plugin][1] However I would like to restrict subscribers users who are login from accessing frontend and keep ...
0
votes
1answer
778 views

Restricted images only for logged user. (hidden url)

Im looking for way to create page where only logged in user can see images, but images cant be index by browser, cant be accessed by not logged in user. Simply, if logged in user copy image link, ...
0
votes
1answer
46 views

Restrict directory listing to only logged in users

I am using directory listing with http://adamwhitcroft.com/apaxy/ theme. Which is obviously not part of WordPress. I am looking for a way to allow only registered subscribers to access + download ...
0
votes
1answer
57 views

Multiple domains, Single database, 1 Parent/Master with all content, other domains/slaves with filtered content (based on “location” variable)

Sorry if the title of this is not clear. Here's my scenario. I want to create multiple sites (will use 3 as example) with the following content filtering. www.main.com - serves all content www.usa....
0
votes
1answer
2k views

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

Hide everything on site for visitors except specific page IDs

I have a client who wants to close down access to the entire site, every post, category page, archive etc (while keeping the content), except for three specific pages (Start, about us, contact). None ...
2
votes
1answer
125 views

Restrict PDF links

How can I restrict only the PDF files that I uploaded through FTP, I copied the link of each PDF file and created buttons in WooCommerce, I can Restrict the Page/Post but not the PDF. I want users to ...
0
votes
2answers
1k views

User restricted only show posts assigned to current user

I have to make a site where i have to assign posts to users. Want i already did: 1: made new user roles with only 'read' enabled But i can't seem to figure out how to assign a certain post to a ...
1
vote
1answer
444 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 ...
4
votes
1answer
813 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 ...
0
votes
1answer
4k 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
481 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
1answer
861 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
103 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
1answer
83 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
32 views

Restrict backend but allow to use post.php?action=delete&post=POSTID from front-end

Restrict backend. add_action( 'init', 'blockusers_init' ); function blockusers_init() { if ( is_admin() && ! current_user_can( 'administrator' ) && !( defined( 'DOING_AJAX' ) &...
0
votes
0answers
327 views

Restrict access to custom post type and filter from every query

I created a custom post type topic which is just for internal use. I managed to assign the correct capabilities so that users of certain roles can edit/publish/delete posts. Now I want to redirect ...
0
votes
2answers
411 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 ...
1
vote
1answer
425 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 ...