Questions tagged [private]

The tag has no usage guidance.

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

How to have private pages using CAS auth without requiring wordpress accounts?

I have a few sites that I am needing to find a way to make private pages where only people CAS authed can see them. I have been playing with Authorizer to handle the CAS authentication, and tying into ...
1
vote
1answer
2k views

Post visibility based on user role

How can I make it so that new posts will be automatically private, except visible to other users which have the same user role as the post author?
2
votes
1answer
3k views

Redirect to login when on private page, and when logged in to specific page

I´m using a plugin called "private content login redirect". The plugin is actually only containing this piece of code: add_action('template_redirect', 'private_content_redirect_to_login', 9); ...
0
votes
0answers
9 views

Set a specific category to be private by default

I am trying to make a specific category private by default. I am administrating a website for a medium sized artistic community and would like my users to be able to publish private posts, through a ...
6
votes
3answers
12k views

Set posts of a custom post type to be private by default?

Say I created a custom post type called 'Private Posts' ($post_type = itsme_private_posts) and want all posts under the custom post type to be set to 'Private' automatically when published i.e. by ...
0
votes
0answers
16 views

Filtering private Posts

i got a page wich contains only private posts. Is there a possibility to use the wordpress built-in filters like archive or category?
0
votes
1answer
15 views

Check the stored / cached WP_Query with transients on post change

right now I have WP_Query stored for 24h (1day) with set_transient function. Everything works fine like it should. But if for example I change the post which is in the stored array to private or ...
0
votes
1answer
24 views

Forcing two or more custom post type to be private

I registered a new custom post type and forced it to be private, but now I need to use three custom post type. I registered the second one, but I don't know hot to set the code to force the second one....
0
votes
2answers
69 views

How to remove private posts from RSS feeds?

Private posts are visible only to administrators and editors, but I have found that they are displayed publicly in RSS feeds. How can I remove them from there? I have this code but it doesn't work: ...
0
votes
3answers
952 views

What differences are there between a Privately Published post and a Draft post?

WordPress has three different post statuses: Published Pending Review Draft It also has three different visibility options: Public Password protected Private When you set a post to Published and ...
2
votes
2answers
7k views

How do I check if a post is private?

What I am looking to do is check if a page is private, give the users the option to register and see the page. Here is what I have now: <?php if (have_posts()) : /* Print the most as normal */ ...
0
votes
1answer
184 views

Accessing private posts through REST API, same code that works in remote doesn't in local

I am capable of fetching private posts through the wp rest api by calling mydomain/wp-json/wp/v2/posts?status=private&slug=whatever I am authenticating well and receiving a valid token, no ...
8
votes
3answers
2k views

How can I make it so the Add New Post page has Visibility set to Private by default?

I'm trying to create a plugin that alters the Add New Post page so the Visibility field says "Private" by default: Status: Draft Visibility: **Private** Publish immediately [Publish] ...as opposed ...
5
votes
0answers
1k views

Fetching private posts or custom post types via WP-API with basic authentication

I've installed WP-API along with Basic Auth. I'm able to fetch cpt posts using curl http://siteurl.com/posts?type={post-type} However, if I change a post to private, it is no longer returned. This ...
0
votes
0answers
15 views

Code correction - Hide a profile from visitors with a specific role

The following code i tried to hide the profile of subscriber's role of user not logged in but I need it to be visible to the administrator and shop_manager, how can I do it? add_action('bp_ready', '...
1
vote
1answer
808 views

Hide a template part when page is password protected?

I'd like to hide the sidebar of my page when the page is password protected and the password has not yet been entered. I've searched for a while and haven't found any condition I could use. Maybe ...
0
votes
0answers
26 views

Cannot see private content

I have put all my pages private check and now I cannot access the wp-admin. Does anyone know how I can fix this from the database or from the WordPress code? I'm the administrator.
0
votes
1answer
50 views

Will 'private' status prevent Woocommerce products to be indexed by search engines?

I'm currently disabling some Woocommerce product from my site and for this, I set them as private. I'd like to know if 'private' will also set the no index meta as true?
0
votes
0answers
32 views

Redirecting users to SSO for private pages without restricting standard login

I have the miniorange SSO plugin installed (https://wordpress.org/plugins/miniorange-saml-20-single-sign-on/) and I want to check users on private pages only through that SSO, logging them all in as a ...
7
votes
5answers
21k views

How do I remove unwanted pages like archive, search, etc.?

By default WordPress pushes out a whole array of pages I don’t want or need - archive, author, blog, monthly, recent posts, categories, comments, attachment, taxenomies, search, search results, and ...
3
votes
5answers
5k views

Exclude Private, Draft pages from Primary Nav when using custom menu

I'm looking for ways to prevent "private" and "draft" pages from appearing (to non-logged-in admins) in a site's Primary Navigation menu which is based on a custom menu - other than manually removing ...
0
votes
1answer
200 views

Custom post type permalink returns 404 when set to private

I have a custom post type that is configured to use a permalink structure prepended with the post type name. When using get_permalink(), the URL that is returned does not include the post type name. ...
0
votes
1answer
19 views

How to block access to Crawlers to any Image on a Private page

We found out that a reverse image search on google images was able to link to a set of images that are on Private Pages. Is there a plugin that can fully protect these images? if not what coding ...
-1
votes
1answer
454 views

Exceeded the virtual memory limit

I've launched website a few weeks ago using WP. I've started getting messages from my web host saying "Your website.com web hosting account exceeded one or more of its resources within the last 12 ...
2
votes
3answers
3k views

Attach a private function at a hook?

I have a class with some private & public functions. The thing is that I don't want some of the functions to be able to be called outsite of the class, so I want to make them private. But I need ...
0
votes
0answers
220 views

Subscriber (with read permissions) cannot view Private posts

QUESTION: Why can't my Subscriber role (i.e. logged out user) view Private posts with the read_private_posts (or read_private_pages) capability extended to them? I use the Capability Manager Enhanced ...
0
votes
2answers
936 views

Custom get_the_password_form

I'm interested in creating a filter for pages with password protection and that have a certain category. I've placed this code in my theme's child folder in functions.php since I didn't want to edit ...
0
votes
1answer
21 views

Assign a username and password to specific users

We need a public section to our site and a private section. For the private section we would like to assign a username and password for each user that is NOT their Wordpress username/password. Is this ...
0
votes
1answer
69 views

Administrator cannot see private content

I have a WordPress site and I want to hide most of the content for awhile. I have changed the status of almost all posts to private but there is a problem. Although I am the administrator I cannot see ...
0
votes
1answer
28 views

Is there a way to load pages/site from specific referring source only?

I am trying to create a user manual for our software which would be stored on WordPress. But I don't want it accessible to just anyone, it should be hidden, at the very least not indexed by search ...
11
votes
1answer
15k 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 ...
1
vote
0answers
29 views

Show certain posts in a LIST format that members have been granted access to

I need post visibility control, but I don't want just "a class of users" to be able to see a post; I want just 2 or 3 users I specify to see a post. Then later, those same users will go on to view ...
0
votes
1answer
1k views

Private post hidden from Admin too

I have a strange problem. I am running a woocommerce site with several levels of privileges/roles. I wanted to reserve a group of products for specific users and was anticipating modifying the user ...
1
vote
0answers
34 views

Can't locate a hidden private page

I have 9 published page, and 1 private (invisible) page, in total 10 pages. However, my wordpress says that there are (2) private page, and total of (11) pages. How can I locate the unseen page?? FYI,...
1
vote
1answer
9k views

The best way to protect uploaded media in WordPress?

I'm new to WordPress as I normally code my stuff by hand, I've been uploading some media to display links to within protected pages, which is great, however, anyone can access the direct url of the ...
1
vote
1answer
2k views

Private page protected with username and password

We are building a WordPress site where one of the pages needs to be accessed via username and password. I know that I can create a "Private" page, where the user can enter a password to view. However,...
1
vote
2answers
1k views

My custom page template with is_user_logged_in() does not detect that I'm logged in

I have a custom page template that looks like this: <?php if( is_user_logged_in() ): ?> <?php get_header(); ?> <?php while ( have_posts() ) : the_post(); ?> <?php ...
1
vote
3answers
2k views

How to show just private posts in loop

I have a section in my website where i want to display just the private posts for logged in users, but the loop returns all posts (private and publish), is it possible to change this? I have the next ...
0
votes
1answer
726 views

read_private_pages capability not working for new role

I have created a new user role - vendor - with the capability to read_private_pages, but when I log in as such a user, and go to a private page I cannot see it. Here is my plugin code: function ...
1
vote
1answer
1k views

List Category Posts not showing posts marked private to logged-in users

I'm using the List Category Posts plugin, and it isn't listing posts marked private, even if the appropriate user is logged in. Is there a fix for this?
1
vote
1answer
39 views

How do i make my wordpress website private?

Ive seen other similar posts on here asking the same question but cannot seem to find an answer for my situation which is a bit more unique. I'm building a support website for a product we have and ...
1
vote
1answer
604 views

View Private Published Page with URL Code (no login required)

The goal is to easily allow for larger entities/clients to review content without having to have a user login/account for every project stack holder involved by providing a single URL to the final ...
11
votes
2answers
6k views

Where to securely store API keys and passwords in WordPress?

I'm looking to use a few APIs and many come with keys, secret keys and passwords required to work. Where in WordPress can you store that information? Assuming anyone can hack your DB is there anyway ...
1
vote
0answers
18 views

How to update the counter of private pages in the dashboard?

In my dashboard the counter of private pages shows 1, but the list of private pages is empty: Is there a way to recalculate the counters of pages and set them to the proper values?
1
vote
1answer
2k views

query private custom post type

My custom post type is registered with 'public' as false and I'm querying with a WP_Query() object. arg's 'post_type' set to private too. The url is site.com/?post_type=my_post_type I've tried to set ...
1
vote
1answer
62 views

Protecting uploads not working

I am trying to build a private site. One of the most important aspects of the site consists in the uploads, and they definitely need to be private. I found a very interesting topic on that here: How ...
2
votes
1answer
587 views

Disable comments from showing up public for Custom Post Type

I have a CPT which supports comments. This CPT is meant for internal use only. However the comments show up in the "Recent comments" default widget. They also show up in the RSS feed. Is there a ...
0
votes
1answer
3k views

Private Posts/Pages & Search

I have a site up where there is one private page and one private post. When logged is as admin, i can view both of these, and they even appear in the search. However, when logged in as an editor, I ...
2
votes
3answers
7k views

How to keep track of user logins?

I have a client with a private Wordpress blog - that is to say, you need to log in to read it. We are using Counterize to keep track of visits to the site and to find the most popular pages. But now ...
1
vote
1answer
508 views

get_terms(); show private posts when logged in

Hi have a custom post type "FAQ". I got some "FAQ's" that are private, also only visible for logged in users. I used "get_terms()" funktion for a widget that is listing links to the categories of ...