Questions tagged [content-restriction]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

Restrict Woocommerce product description if product is not bought by logged in user or general viewer

Here, I want to restrict the product description to the users who bought it and other user who didn't bought it should no see it. I don't know how can i do it. Please help.
2
votes
0answers
61 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( '...
0
votes
0answers
13 views

How to restrict End users into logging into wordpress dashboard

I am using saloon plugin where shop owner and super admin both should have access to backend dashboard but i want to restrict end users from accessing backend dashboard i tried using plugin Remove ...
0
votes
1answer
31 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 ...
0
votes
1answer
256 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 ...
0
votes
1answer
44 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 ...
0
votes
0answers
14 views

Restricting Editing/Publishing Based on Role

I'm looking for some help in restricting the ability of users to take certain actions in a fairly stock backend. The basic workflow is that only users in the role 'general_audience_write' or '...
0
votes
0answers
18 views

Showing content to a logged-in user (possibly in a table)

I am building a customer area for a website. I have a plugin that adds extra fields into members' Wordpress profiles and then I use shortcodes on pages where I want to show the data. But I also need ...
0
votes
0answers
16 views

Which hook to use to hide and block content of a specific page?

I think that the user-manager-access plugin is very good, but it does not have API for me to do what I want. I don't want to use any plugin, the goal is to automatically make a lot of actions, like ...
0
votes
0answers
14 views

restrict userlevel=“subscriber” content showing when item is searched

restrict userlevel="subscriber" content shows when you search a product regardless if the person is logged in or not. The restrict works when the product is viewed normally but shows up when using the ...
0
votes
0answers
16 views

Customers to view content based on their purchase

My products are web-based PDF documents that cannot be downloaded (only viewable on my website upon purchase). I want to restrict access only to users who actually paid for the products. How can I ...
0
votes
1answer
41 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?
-2
votes
2answers
29 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!
0
votes
0answers
8 views

Restrict authors from viewing each other comments in the post

As the title says im trying to find a way to restrict what authors can see. Im using custom posts and Authors can view each other posts but how to hide the comment section if the post is not owned by ...
3
votes
1answer
388 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
24 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
1answer
41 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
351 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
29 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
25 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
338 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 ...
-1
votes
1answer
33 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
3k 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
168 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
523 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
40 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
47 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
33 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
69 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
82 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 ...
0
votes
2answers
2k 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
784 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
1answer
16 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
198 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
16 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
698 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
1k 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
445 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
1k 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
55 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
89 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
303 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
147 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
2k 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
545 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 ...
3
votes
2answers
5k 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
856 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
956 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 ...