Search code examples
phpwordpressvisibilityposts

Wordpress: Turn off login verification on post view page


Now when I want visit unpublished post page by direct URL like http://.../?p=123 I see 404 error page. Where in code I must to perform fixes to show posts for all guests and visitors undependable from post status.


Solution

  • In case if you wish to do it manually without a plugin.

    1. Goto Wordpress>wp-includes

    2. Open query.php in a text editor

    3. Search for something like $status = get_post_status($this->posts[0]);

    4. Replace it with $status='publish';