Skip to main content

Questions tagged [content-restriction]

Filter by
Sorted by
Tagged with
0 votes
1 answer
43 views

How Do I Remove Pagination From A Single Blog Entry?

I am using the Pipdig theme Opulence, and am currently using a Static Front Page for a custom homepage, and a separate Static Posts page, so that I can decide where my viewers go. I have also made it ...
Designer's user avatar
1 vote
1 answer
71 views

How to restrict content on a subdomain to users that registers on main site?

I would like to create the following type of set up and wonder if anyone knows if it is possible on a subdomain and how it can be done. I have a main site, "example.com", and a subdomain, &...
I have many questions's user avatar
1 vote
2 answers
146 views

Content Restriction but allow public REST API

My Question, is it possible to restrict the content from a post (shwo e.g. teaser/excerpt only) but still let access the content fully by the REST Api interface? My scenario is that i would like to ...
RestAPPDev's user avatar
0 votes
1 answer
22 views

Restrict page to members only does not work for page ID, slug or page title

I was wondering why (and how to) restricting pages by the following criteria does not work. I wanted to restrict the contact page due to spam. The code is being added and activated on front-end using ...
Johnny Bravo's user avatar
0 votes
1 answer
168 views

Restricting Image Upload Sizes using 'wp_handle_upload_prefilter' - Stuck media progress bar when Featured Image?

I have grabbed this function and adjusted it to my needs. add_filter( 'wp_handle_upload_prefilter', 'check_image_dimensions_during_upload' ); function check_image_dimensions_during_upload( $file ){ ...
dekkyd's user avatar
  • 7
2 votes
0 answers
45 views

How to protect content from public users and limit access to certain roles in WordPress 2023?

There are hundreds of content protection plugins and role managers, however in my current case I need a custom solution. The customer wants that only "logged in users" are to be able to read ...
Blackbam's user avatar
  • 565
2 votes
1 answer
605 views

Restrict Image Sizes and Dimensions when Uploading via the WP Mobile App

I restrict image uploads by file size and dimensions on my client's websites using 'wp_handle_upload_prefilter'. However, it appears this function is not called when using the WordPress.com mobile app....
Jim S.'s user avatar
  • 21
0 votes
0 answers
34 views

Multisite Login Access Restrictions

I am building a multisite where users can sign up to create a subsite about there business. I would like to have them be able to login to the backend and edit there subsite but restrict them from ...
Daemon's user avatar
  • 1
0 votes
0 answers
41 views

Disable Page if user not logged in

I am using the zoom plugin for creating workshops, and I want to make the nonusers cant access the workshops pages until they log in. the link for each workshop will be different ex (https://******....
KDot's user avatar
  • 15
0 votes
1 answer
326 views

Show/hide posts and categories based on user meta

I've added additional input fields to the user profiles with Advanced Custom Fields (for example "type of customer"). How is it possible to hide posts and categories for users with specific ...
Mario's user avatar
  • 101
0 votes
1 answer
24 views

Limit users to specific uploads

I'd like to restrict users to only see/manage only their own uploads. However, there's a requirement to allow one than one account to manage these uploads. It cannot just be the person who originally ...
BobsBurgers2356's user avatar
0 votes
1 answer
933 views

Hide front-end from every logged out user and redirect them to the default login page

I want to hide the front-end from every visitor/logged out user. To see the front-end, every user must have been registered and logged in. Any visitor that's logged out should be redirected to the ...
Zaeem Javed's user avatar
0 votes
0 answers
57 views

URL Restrictions? Need only people who are logged in AND have a specific role (or roles) to access all pages for a site

I have a site that needs to only allow people who are logged in and have at least one of 3 possible roles to have access to the pages of the site. I'm not new to programming, but am new to both php ...
A.Karwowski's user avatar
1 vote
0 answers
25 views

Protect sequence of pages with same password for each of two groups of users

I'm currently creating a home page (learning environment) with wordpress. It should serve for an experimental study with two conditions. Based on the condition a participant will be assigned to, he or ...
Nadine M.'s user avatar
1 vote
1 answer
1k views

Restrict uploaded files into a custom folder to logged in users by htaccess: looking for Nginx - not only Apache - solution

Talking about this well known solution: Github Original discussion I'm looking for a straightforward way working also on a Nginx installed WP and not only on Apache ones. Is there any other code-based ...
PatrizioRD's user avatar
0 votes
1 answer
66 views

How can i restrict a page to certain user roles?

I would like to know how can i restrict a certain page to be shown only to specific user roles & also show an error message that the user is not allowed to view this page if the user role is ...
Hayder Allawi's user avatar
1 vote
1 answer
446 views

How can I restrict image upload dimensions for non-admin WordPress users?

I want to restrict the dimensions of images uploaded by anyone who is not an administrator in WordPress to a specific size. I also want to return a specific error feedback when the image uploaded ...
Patrick Aziken's user avatar
1 vote
1 answer
90 views

How to restrict logged user to view only certain pages?

How can I restrict a specific logged user (current role is subscriber) via wp_get_current_user() to view only specific pages?
danielradst's user avatar
1 vote
1 answer
39 views

Redirect user to login before viewing custom post

I have a site with a listings page (https://gymkoi.com/class-listings/) and all I'm trying to do is redirect a user who is not logged in to my login page (https://gymkoi.com/login/) before they can ...
Jon Timms's user avatar
0 votes
2 answers
77 views

After reading 3 story by user ask for subscription popup

I am new in word-press development, i want to make a news website in which user read two story then ask him to pay(Subscription Plan), when he registered he can read unlimited
Pankaj Yadav's user avatar
1 vote
0 answers
18 views

Limit post display to post authors and create an exception for specific pages

I'm trying to limit the display of the content to authors and need to make specific pages viewable by everyone (i.e Dashboard / Data entry ...) Any suggestions on how to add specific rules to display ...
moab's user avatar
  • 11
2 votes
0 answers
248 views

Limit REST API output to current logged in user that is also author of the content

https://developer.wordpress.org/rest-api/using-the-rest-api/frequently-asked-questions/#require-authentication-for-all-requests This requires authentication for all reque​sts. add_filter( '...
lowtechsun's user avatar
0 votes
1 answer
59 views

How can I fetch user registration age

How can I fetch the user registration age? Like for example user A registered 7 days ago, user B 10 days ago etc. In my current project, I have this requirement where there are set of tutorial videos ...
dh47's user avatar
  • 50
0 votes
1 answer
3k views

Get a remote post ID via API given URL

Given you have a URL, how can you get the post ID of a post on a remote WordPress site? As far as I can tell, you would have to: HTTP GET /wp-json/v2/posts And then look for your URL, but the ...
John Dee's user avatar
  • 513
0 votes
1 answer
282 views

Restrict the list of parent pages to only those which are created by current user

I think the title of this post is quite self-describing, but I would like to restrict the list of parent pages (in the edit page form) to only those pages, which are created by logged user - the list ...
Honza's user avatar
  • 101
0 votes
1 answer
214 views

how to make author to write comment on only his own posts?

i want restrict my registered authors to write comment to other posts except his own posts. Is it possible? I have no idea how to do it. May be need conditional logic but how?
Ramin Mahmudov's user avatar
-2 votes
2 answers
361 views

How to stop EU users from accessing my website?

I have a website using self-hosted WordPress. I am pretty confused with the GDPR law by EU. So, I want to block EU users from accessing my websites. How i can do that? Please help!
Abhishek VERMA's user avatar
4 votes
1 answer
2k 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 ...
Rick Curran's user avatar
  • 1,076
0 votes
0 answers
38 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 ...
Bud's user avatar
  • 43
0 votes
1 answer
268 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 ...
Carobell's user avatar
  • 143
1 vote
2 answers
3k 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 "...
Nirmal Mulji's user avatar
0 votes
1 answer
164 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 ...
zhekaus's user avatar
  • 101
1 vote
0 answers
49 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 ...
Miles's user avatar
  • 11
0 votes
0 answers
923 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 ...
Lz430's user avatar
  • 137
-1 votes
1 answer
52 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?
Walid Ahmed Samy's user avatar
-1 votes
2 answers
9k 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 ...
user avatar
4 votes
1 answer
1k 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 ...
Neha Patel's user avatar
0 votes
2 answers
1k 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 '...
Galgóczi Levente's user avatar
1 vote
0 answers
76 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 ...
Pawan Kumar's user avatar
0 votes
1 answer
76 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, ...
Benji's user avatar
  • 101
0 votes
2 answers
44 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', ...
DoktorD96's user avatar
0 votes
1 answer
252 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 ...
Alex F's user avatar
  • 101
0 votes
1 answer
205 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 ...
user124296's user avatar
0 votes
2 answers
4k 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 ...
Reza Ramezanpour's user avatar
1 vote
1 answer
2k 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, ...
murcoder's user avatar
0 votes
1 answer
23 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'] == '...
Pravin Nath's user avatar
1 vote
0 answers
397 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/...
Inge's user avatar
  • 11
0 votes
1 answer
25 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 ...
Brian Rushton's user avatar
0 votes
1 answer
2k 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 - ...
RevelationTravis's user avatar
1 vote
1 answer
4k 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 ...
AutoBaker's user avatar
  • 150