As it doesn’t look as though the OP is coming back, I’m adding their answer as an answer rather than leaving it in the question:
For everyone dealing with the same problem: I was able to fix it with
a code snippet of another thread:
https://wordpress.stackexchange.com/a/172556/87321Just had to add the post status “pending”, so the working solution is:
add_filter('wp_insert_post_data', 'mark_post_private');
function mark_post_private($data)
{
if(($data['post_type'] == 'your_post_type_goes_here') && ( $data['post_status'] == 'pending'))
{
$data['post_status'] = 'private';
}
return $data;
}
Related Posts:
- What differences are there between a Privately Published post and a Draft post?
- How to set a Post’s default visibility to ‘Private’ in Gutenberg?
- How to allow Contributors to edit their own posts, whilst still needing to be reviewed by an admin?
- Stop WordPress Wrapping Images In A “P” Tag
- Keyboard shortcut for updating a page or post?
- How to Display a List of Users Who Have Made at Least 1 Post?
- Customizing HTML Editor Quicktags button to open a dialog for choosing insert options
- Allow user to “edit_others_posts” to save only, not publish
- how to limit edit_form_after_title hook to page and post edit only?
- Listen to Post action
- How to create WP Editor using javascript
- How to add editor’s name to entry meta byline?
- Force “Submit to review” when a post is updated
- Restrict access to post if it is currently being edited
- Change padding to text indent in “Increase indent” TinyMCE
- How can I allow editors to leave comments on posts that have not yet been published?
- Automatically added brs and paragraphs?
- featuring old articles without messing up with the archive
- Setting post meta data to random value during post status transition / on publish
- How can I pass $post object to ‘save_post’ add_action?
- How to change post status from publish to draft using hook in wordpress?
- Hiding by default specific post status on backend list?
- Enable commenting on front-end preview page for pending posts
- Custom function for “Submit for Review” hook
- add image map script to post
- Custom Post Status Posts viewable to the public
- Content editor creating blank paragraphs in spaces and creating   in the_excerpt
- Send email to user that his post has been rejected
- 2nd button row from WP Super Edit or TinyMCE Advanced doesn’t show to 2nd admin
- How can a guest view the “Pending Review” Post?
- Strange problems when I try to insert HTML\XML code snippet in my posts
- How do I batch create revisions of all posts?
- add filter to “quick edit menu” in wordpress admin
- How can I add a meta-box to the posts editor containing all items of a custom taxonomy as checkbox?
- ‘transition_post_status’ only fires when pressing “Add New”
- Planned private posts get published immediately
- Visual / HTML tabs vanished on editor
- Getting a 404 error when clicking edit page
- WordPress version 3.8 – Preview button not working for editor
- Private Posts/Pages & Search
- Update post status from “publish” to “trash” for half of posts
- How to retrieve the postID in a “image_send_to_editor” hook function?
- How can I set a Post’s default visibility to private and pending review checked
- how to remove dash (-) post status from post title on posts listing page wordpress
- Make Post Editor Select Number of Columns To 1 By Default
- Are private posts visible to search engines?
- How to change post status from frontend?
- Whitelist Author of Private Post
- Show certain posts in a LIST format that members have been granted access to
- Lost draft under all posts and drafts
- Posts and Attachments with “Published” status in Search
- Post visibility based on user role
- Admin – create custom post status and display above table
- Restrict edit, but allow preview for custom post status
- WordPress capabilities on pending post status
- why there are so many posts whoes post_type is revision? will these records waste too much database space?
- Send a review notification email to admin when a post is 12 months old
- $post->post_type not working
- how can i allow users to view their own pending posts in a front-end page
- WP text styles not coming through to actual post
- Manage Private Posts
- WordPress.com post editor replacement
- Why can’t publish posts with too much text?
- Is there a way getting post fields using `transition_post_status`
- What function publishes a post when you click the publish button?
- Post Status Frontend Announcement
- Display amount of pending posts in back/front end
- How can I create an RSS feed that includes “Private” posts?
- Showing posts for today and future
- Preview page/post revisions without overwriting current content
- Posts and Pages w. private visibility don’t show up in existing content
- Keyboard shortcut for headings on safari
- any way to access variables from within post editor?
- Separate blog and reviews categories
- Show Last Revision Of Post That Has A Published Status On Single Page
- How can I restore posts from ‘trash’ with their previous post_status? – WordPress
- Embedding Post Editor Into External Site
- Updating post status via rest api
- Filtering private Posts
- Contributor edits published post and sends for review – post is made private?
- Display simple html code in post
- How publish post from pending status
- Hide or remove custom post status
- Put page on Archived statut after end of publication date
- get_next_post() not working with future post status
- How to allow some visitors to edit inline specific post
- Modify loop to include all post statuses not just ‘published’
- Function/filter or plugin to change post status based on custom field value
- How to custom sort-out editing-panel fields?
- Stripping tag from elements in post
- Post thumbnail is not shown in wp-admin
- get_posts includes “auto drafts”?
- I am creating a front end dashboard where I need to show all the posts by the current user. So, I need to show posts in publish
- How can I make my blog private? [closed]
- Post Format Status [closed]
- Do anything on post_status change [duplicate]
- Making a private post visitable by link?
- editPost without undo entry
- Add “reviewedby” in WordPress posts
- REST API – Retrieving posts with custom status