Set WordPress Posts To Private By Default

Admin Area

The following code snippet will allow you to set all your posts to private as default. We do this by using the action post_submitbox_misc_actions and inserting jQuery into the page to change the selected visibility setting.

First this will check to see what the current post status is. If the post status is publish then we can set the visibility status to publish. Then we check to see if the post password is not empty, if the password is set we then set the visibility to password. We . . .

Upgrade to access all content on Paulund

Members unlock all tutorials and snippets

Access to all downloadable content

Access to code examples before others

Sign Up Now

Already a member? Login here

Subscribe To Newsletter

Get weekly updates to your email