You can use WP_Query to get the posts created by user in a specific category as well as a post type.
To find posts of a specific category you can use the following snippet:
$query = new WP_Query( 'category_name=staff' );
Where as to find posts of an author you can use the following snippet:
$query = new WP_Query( 'author=123' );
Combine this in a single query and if the any posts are returned that means user has already created a post.
For reference, check this link
Related Posts:
- Content Restriction but allow public REST API
- wp_enqueue_script adding conditional statement not working
- Check if first paragraph is an image, then show custom code right after it?
- If post author role is X
- Can a conditional statement apply to part of a slug?
- Add default content to posts in a specific category?
- is_front_page, is_page(‘slug’), is_page(id) not working
- Need help on creating If-statement for custom meta fields
- How to make gravatar.com avatars conditional?
- Loading Scripts on Specific Pages
- Condition function for is parent category?
- Conditional Statement – Best Way to Remove Nav on Contact Page
- Proper syntax for simple conditional bloginfo language
- wordpress is_page() problem
- Location-Based Content
- Personalized message for each unique password-protected page
- Conditional Shortcode image display
- Change Woocommerce order button page on particular page
- Change a url / link if a user is logged in?
- to create own conditional tags for business directory in wp
- How to use “Cases” instead of “IFs” for conditional logic
- Which is the better way to write a conditional statement? [closed]
- Nested conditionals
- Is there a way to password-protect part of a post?
- if/Else have_posts Else fails to echo message to page
- Conditonal statement for iPad
- Return function only on certain pages
- How to write this conditional statement?
- Conditional for Custom Post Types
- Date-Based Conditional Tag
- Message box when accessed from iPad
- Show this code if user has previously left a comment
- Insert a conditional in the middle of a function to give it 2 different outcomes
- How can I use ‘edit_form_after_title’ conditionally?
- Force Log in to view a page
- Conditional loading of CSS for my plugin
- Looks like this if condition is not working [closed]
- Generating images from an array of categories
- can you help review CCCP (Conditional Cookie Content Post) and help to create a block?
- WP conditional site logo and header block
- How to know if the most recent article
- Multiple domains, Single database, 1 Parent/Master with all content, other domains/slaves with filtered content (based on “location” variable)
- Widget logic conditional widget
- How to display image on condition that a selection has been made
- How to Conditionally Not Display a Link Based on Current URL?
- If statement to check for post_content
- why is my custom loop failing?
- Conditional sidebar menu
- What is the best way to disable my WP website if the user has adblocker on? [closed]
- How to tie two conditions to one statement
- Create a page from different content blocks
- How do test if a post is a custom post type?
- Enqueue Scripts / Styles when shortcode is present
- wp enqueue style on specific page templates
- Loading scripts only if a particular shortcode or widget is present
- Why isn’t is_page working when I put it in the functions.php file?
- How to restrict attachment download to a specific user?
- simple solution for restricting access to (some) uploads/downloads
- How to conditionally enqueue a stylesheet only for a certain page(s)?
- Correct Post Count ( All | Published | Drafts | Pending | Trash ) for Custom Post Type when restricting to view own posts
- how to create a conditional content_width for a wordpress theme?
- User redirect to destination URL after login
- How can I determine if a post has an image attachment?
- Display navigation menu item conditionally based on user capabilities
- How do I place content on archive pages but not on main page?
- If Post Type equals, then display X content
- Create a USERNAME and PASSWORD protected WordPress page
- Loading posts associated only to the logged in user on recent posts page
- Does pre_get_posts affect REST API responses?
- Display several random posts, but make sure a condition is met
- Restrict post edit/delete based on user ID and custom field
- Multisite Conditional (if blog_id?) in a page template?
- Show content after the first and second paragraph
- How do I display a user specific content?
- How to restrict a page [without plugin]
- Show/hide Widgets in Dashboard Based on Current Advanced Custom Fields Option
- How to display the_post_thumbnail if a post has one or otherwise display the first image in a post?
- How can I limit functionality in one version of a plugin?
- Loading Javascript Only When Specific Content Existing in a Post?
- Can shortcodes contain conditional statements? Even without them my shortcode renders blank page
- Hiding posts from non logged in users
- Restrict access to post if it is currently being edited
- how to test for attached image
- Show different different menu in theme_location depending on x
- Display only certain posts based on visitor’s country?
- Exclude custom function content from certain pages
- how to make author to write comment on only his own posts?
- setting a specific home page for logged in users
- meta content on required pages
- Shortcode to Gutenberg-block: additional text on front-end and conditional display
- Conditional Statement – check if post has an attachment image
- If function exists, and array is met, echo function?
- Restrict the user access in multi site for non-assigned blogs
- How Can I Register Menus and Widgets Conditionally Based on Theme Options/Settings?
- Restrict access to the Trash folder in Posts
- How to hide and content from auto-generated excerpts?
- Is there a PHP function that can match anything after the given URL, so my IF statement will work in each instance?
- Restrict backend but allow to use post.php?action=delete&post=POSTID from front-end
- How to tell if the user is an admin?
- Function like in_category for custom taxonomies