You could perhaps:
1) Create the category for your Private posts, e.g. “Private”
2) Exclude the “Private” category from your main Loop
3) Output the “Private” category using a custom template file, e.g. category-private.php
4) Wrap the Loop in category-private.php in an if ( is_user_logged_in() ) conditional
(This assumes, of course, that you are the only user of your site. You will need to modify if you have additional users.)
EDITED TO ADD:
5) Wrap the Loop in single.php in an `if ( is_user_logged_in() || ! is_category( ‘private’ ) ) conditional.
6) Add an exclude=#' argument, where#is the Category ID of the "Private" Category, to any call towp_list_categories()`.
Related Posts:
- Let private posts stay in status “private” after edit through “editors”
- Planned private posts get published immediately
- What differences are there between a Privately Published post and a Draft post?
- Private Posts/Pages & Search
- Are private posts visible to search engines?
- Whitelist Author of Private Post
- Show certain posts in a LIST format that members have been granted access to
- Post visibility based on user role
- How can I create an RSS feed that includes “Private” posts?
- Posts and Pages w. private visibility don’t show up in existing content
- How to set a Post’s default visibility to ‘Private’ in Gutenberg?
- Filtering private Posts
- How can I make my blog private? [closed]
- Making a private post visitable by link?
- simply loop through posts
- How to Display Network Post Count?
- WordPress Queue like Tumblr?
- How to disable content pagination?
- How to add/assign or change featured image in post programmatically?
- WP-CLI Bulk delete posts from specific category
- Update all posts automatically when using post_meta
- Moving WordPress to new server: no posts found
- Exclude ALL posts from sub categories
- Post ids are incrementing by an unknown number?
- Can’t show comments count per post outside loop
- Get current users post URL?
- Redirect based on user post count
- Should our pages be posts?
- Allow role to delete posts but block him the wp-admin
- How to Add ‘Post Categories’ to the Dashboard Sidebar
- Link post permalinks to subdirectory /post
- Remove the Edit button in posts for permalinks on certain user roles? WP 3.3
- Show total author’s post views by posts post_meta
- Get the most repeated post contents from a search?
- pre_get_posts query between 2 dates (date stored in custom post meta)
- Why is my Blog Page ID == First Post ID?
- Get the number of posts shown in the current page
- Get all attachment by post excluding featured and content inside
- Custom loop pagination links not working
- CF7 upload file failing [closed]
- If in_category not working for multiple single.php pages
- Overwrite posts/pages via import
- Auto-realod with new posts // Ajax call
- Is it possible to add/tick a category to a post when it is created?
- How many posts does the loop return?
- Posts loop displaying the same post data
- Display Posts on Custom Page
- Possible to alternate between two loops
- Blog Post On Home Page Displaying Page Published Date Not Post Published Date
- Why does a published post only displays the title and not the content in the site? [closed]
- Counter is skipping post when I still want it visible [closed]
- Trying to edit archive.php to only show post extract, with featured image
- Divs appearing everywhere in post content
- Latest posts by category — how to exclude current post?
- Sticky Post from page 2 and on
- Edit custom fields in posts list
- Is it advisable to use $post->comment_count instead of get_comments_number( $post_id )
- Restore woocommerce orders
- Split post title for styling
- Post/page title to permalink transformation – what is behind the scenes?
- query for filtering published posts?
- All images on one line for each post
- How to show full post on home page
- Pull in posts using post meta for REST API
- Show Last Revision Of Post That Has A Published Status On Single Page
- how to show comments only author which send own posts in wordpress
- Avoiding duplcate posts on the main page
- Please help a newbie with blog page issue?
- Alt text attributes not showing over portfolio images
- How to work with posts and sub posts?
- How to sort WP_Post Object array by object field in php?
- WordPress Recent Post with the badge “New” on the side of the title post
- Unable to delete attached file from folder programmatically
- How to create page with post content in it?
- Top tags with minimum number of posts
- Set a post expiration and delete a post when expirate
- getting custom post by tag
- On WordPress Search, how to search post from Author meta also
- Single Sidebar; multiple templates! How?
- is there a way to get the ‘read more’ tag in a manual excerpt
- Next / Previous post in a single category
- Secretly passing post ID/title etc into a shortcode form automatically to link submission to post
- How can I view my posts in ascending order by number of views
- Override wp_link_pages pagebreak with filter
- Retrieve posts inside foundation tabs and tab-content split by 3 per row
- How to sort posts in admin by name
- Extracting a TLD from the content and assign to custom field
- Blog only showing one post even though more published
- Show only top 3 posts from 3 categories in order on home page
- Help with a function that will place a map pin for all posts
- how to create a new page that is not in the hierarchy?
- How to custom sort-out editing-panel fields?
- Modifying the permalink href for posts with jquery
- Related post by category throws internal server error
- How to find the page of specific post?
- Display posts in row Horizontally [closed]
- How to var dump urls for all posts
- How can I fixe the article title problem?
- Automatically select category based on user role
- Hide page title on dedicated posts page