Questions tagged [private]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
11
votes
1answer
14k 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 ...
8
votes
2answers
4k 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 ...
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 ...
6
votes
2answers
249 views

Let private posts stay in status “private” after edit through “editors”

I'm using some private posts for intern purposes. When an editor changes something on these posts, its status turns to pending "review" and I have to publish it again as a private post. When an ...
5
votes
5answers
17k 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 ...
5
votes
3answers
10k 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 ...
5
votes
2answers
1k views

Are transients private or public?

Are WP transients specific to the user-session or can they be accessed from any session anywhere? Since they are written to the DB, I would imagine they are public and accessible everywhere, but is ...
4
votes
1answer
1k views

How can I create a separate blog that is private?

I am very new at all this and not a programmer. I want to know how to set up a private blog that requires a member login to view it. Is there a widget that one may suggest that does this. I am using ...
4
votes
2answers
3k views

Forum plugin that allows private groups that are invite only [closed]

I'm looking for a plugin that would allow me to create private groups for discussion that are invite only. These would be for people who have taken a workshop and want to remain in communication with ...
3
votes
1answer
3k views

Using a private method as an action callback from within a class

I have created a class from within which I would like to call a private method (from within the same class) from the __construct method as an action callback. When I would like to use a public method ...
3
votes
6answers
18k views

How do I require authorization / login to view a specific set of posts / pages?

I am working on a wordpress site for a client who wants an internal 'intranet' for his employees. The basic needs are: Communicate things in-house House important company documents Provide quick ...
3
votes
1answer
54 views

WordPress i18n-friendly preg_replace post title

I've stripped Private: and Protected: from my custom post title that are forced to be private. I'm using CSS Tricks' snippet for doing so: function the_title_trim($title) { if( is_admin() ) ...
3
votes
1answer
553 views

Members Only site with Feed Keys

I've had good luck for several years (6 years!) running WordPress with Members Only and Feed Keys. This provided a completely members only blog (no external view at all) as well as private RSS feeds ...
3
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 ...
2
votes
5answers
4k 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 ...
2
votes
1answer
6k 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 */ ...
2
votes
5answers
417 views

Private pages that work when you are not logged into WP admin

My understanding of private posts/pages is that they only work when you are logged into the WP admin system as an administrator or editor. I have a site where I need to occasionally share custom ...
2
votes
3answers
2k 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 ...
2
votes
1answer
14k views

Restricting access to files within a specific folder [duplicate]

Possible Duplicate: How to Protect Uploads, if User is not Logged In? Is there any way at all to restrict direct access to files within a specific folder to only specific wordpress users that ...
2
votes
3answers
573 views

Make post password required to publish

I am making a site which will only have password protected pages. I would like it so that the password box is open by default, and is a required fields to publish the post. Ideally I would also remove ...
2
votes
1answer
483 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 ...
2
votes
3answers
1k views

Making a Custom Post type only visible to non-users via a specific link

I am working on creating a small web-app with wordpress as the framework. It allows you to input a customer and in turn sends an email to the customer with a link back to the website in order to ...
2
votes
1answer
978 views

Best way to have an per-user customized private section

A common requirement for business sites is to have a client login which allow visitors to access private content for them (ie: downloads, screenshots, documents). I did it in the past and although it ...
1
vote
4answers
539 views

Restrict WordPress to Private

I want to set up a private WordPress site, with only 2 users, all I need is a simple private site functionality, with visitors unable to see anything when trying to login, only being redirected to the ...
1
vote
2answers
507 views

Planned private posts get published immediately

Somehow, it doesn't seem to be possible to plan post for my subscibers (visibility private) as they get published private automatically as soon as I save them. Is there any way I can keep wordpress ...
1
vote
1answer
623 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 ...
1
vote
3answers
2k views

Show a special message for private page?

If I set a page to private, can I have it show a message instead of a 404 page for public users?
1
vote
3answers
6k 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
480 views

How to create a plugin that notifies for updates?

At this point when I activate a plugin and an update is available it updates the plugin. I like to create a plugin myself that I want to use private, I have several WordPress blogs and if I made an ...
1
vote
2answers
8k views

How to set privilege to wordpress subscriber for private page

I am having private page.I want to show this page only when "subscriber" logged in."Editor" should not access this page.How can i set the privilege.
1
vote
3answers
1k 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 ...
1
vote
1answer
36 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
253 views

Can we have private drafts?

As per the documentation, Draft and Private are two mutually exclusive post statuses. Therefore, when you mark a draft post as Private, it is no longer a draft. We are a big team making extensive use ...
1
vote
2answers
941 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
2answers
1k views

How to make a secure blog that is completely private?

I have a login safe application and it has hundreds of users. WordPress is a separate module of it and only used for blogging purpose [no other usage]. Both using the common database. The blogs are ...
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
1k 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
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
1answer
1k views

Are private posts visible to search engines?

I want to display a list of posts (deals) on homepage (and having a link to original deal on deal provider's site) but I don't want individual posts to be accessible by anyone even search engines. Is ...
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
142 views

Is user listing on wordpress private?

I'm creating a website using Wordpress. Users are registering on it as "Subscribers". When you register, you have a small panel with some custom info on it (that I made, creating a custom template) ...
1
vote
1answer
1k views

How do I display content to users who are not logged in instead of 404 on Private custom posts?

I want to display a message like "You must be logged in to view this", with Private custom posts. Theoretically, I want to use something like this: if (is_user_logged_in()) { // Page code goes ...
1
vote
0answers
28 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 ...
1
vote
0answers
29 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
88 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 ...
1
vote
0answers
15 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
52 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 ...
1
vote
1answer
2k 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); ...
1
vote
1answer
599 views

Change Visibility to Private

I am trying to figure out if there is a way to change the status of a post to private after a comment has been submitted. More specifically 3 comments, I do already have some code made up and would ...
1
vote
1answer
366 views

Setup private content for specific users with daily updates [closed]

So I have only found membership plugins which cater for private area where users can access the material after paying depending on their role. I need to make a dashboard kind of area where users can ...