I think the simplest way to do this would be to give the users a customized Author role when they register. The capabilities of the default Author role are that they can only create and edit their own posts. You’ll have to customize this to enable capabilities for your ‘class’ custom post type, not just vanilla posts. You can hook the user_register
action to query for a faculty post with meta value matching the registered user’s email, then update the user to give them your special role if a matching faculty post is found. For the class posts, hook save_post
to add a connection between that post and the user’s faculty page whenever they create a new class post.
Related Posts:
- Roles for Custom Post Types
- Preventing role reading others posts
- Allow member to have access to custom post type only. Permission to only edit their own posts
- With Rest V2 (WP4.7) how does one restrict certain RESTFUL verbs?
- Custom post type for ‘staff’ versus using wordpress user profiles?
- Showing User’s Post Counts by Custom Post Type in the Admin’s User List?
- Prevent trash/delete action on specific post types
- Custom post type support for get_users(‘orderby=post_count’);
- Creating relationships between multiple content types [closed]
- Front end registration/login & publish/update 1 custom post
- How to programmatically create a connection with [Plugin: Posts 2 Posts] on cpt publish?
- Ordering Post 2 Post admin meta box by meta from CPT
- User roles – enable custom posts disable posts
- Allow Author role to publish one post type and not another
- How to restrict specific post types from being read or added by specific user roles (eg. author)?
- Getting Post ID from slug during init
- How can I get the last posts by user role?
- Assigning a role to a specific custom post type (and ignoring other post types)
- WordPress allow access only one custom post type “xyz” to custom user role but need to hide all admin panels
- How to show custom post type count in the users admin page
- Community and User Generated Content Website: Have been thinking about Drupal but leaning on WordPress heavily
- Delete Current Author Frontend user while delete custom post type
- Connecting a taxonomy with a post type
- Registration and Custom Post Types – How to synchronize information?
- WP-Admin edit.php & post.php slowdown after import of 10k users
- Link users to a custom post type
- Ajax Check Post Status
- One-to-many post relationships that are displayed by category (using posts-to-posts plugin)
- Want to Add Custom Fields for Uploading video to WordPress Users from front end
- how to delete all users and posts based on ‘user_meta’?
- Is using taxonomies the way to go here or would custom post types be better?
- Custom post type: check permissions and validate nonce
- Hiding posts by other users and non-logged in
- read_post meta capability for anonymous users
- No Permission to add new Page, Post or CPT with Admin role
- Users create/join groups
- Disable user from updating certain posts
- Query posts based on the meta key values of logged-in users?
- How to restrict author to only access one custom post type ?
- Create custom post with custom user rules
- Associate multiple users to custom post type
- How to assign permissions for a CPT to a user
- Filtering results for post_type tells me I don’t have permission
- Post 2 Post: Getting connected ‘person’ from post author
- How can i display movies in profile page, added by an user?
- Custom User role not working with custom post type
- get comments by current user inside page template
- how to associate several authors to a custom post type
- Assign post type to many users
- Fix permission error for deleting custom post from front-end?
- Check if user has comment on current post
- Query within a foreach within a query (queryception)
- Showing User’s Post Counts by Custom Post Type in the Author.php?
- get_delete_post_link() only works for administrator, even if other user has exactly the same permissions
- Add a custom post when inserting a new user in WordPress?
- Order users by number of posts (includes custom post type)
- Plugin needed to allow subscribers to post articles on the front end without admin approval [closed]
- Adding a Custom Field to be used by Posts 2 Posts
- Posts 2 Posts plugin: best way to change connection field value?
- Display custom post front end filter by ACF equals current user
- users post count
- Clone wp-admin/users.php (Users Admin Page)
- Why “Mine” is the default view when adding ‘capability_type’ in register_post_type
- Link custom post type to users membership
- Show all post type posts in manage users posts column
- Limit 1 post by user in each custom post type
- Get all of a user’s posts (custom post type) then get cumulative value of a specific meta_key value from those posts
- Assign a Post to a User
- Front-end submitted post is published with admin ID as author
- Add WordPress users to a custom post type
- Custom Post Type Query by user id
- Autofill advanced custom field with user data
- How to create new permission for custom post types for doing specific tasks
- connect users to Custom post types
- Reference field of users in custom post type
- Custom Post Hierarchy and users
- UPDATED: Save a custom_field value when automatically creating a post using wp_insert_post
- Remove Custom Capability
- Creating multiple profiles under one user to assign to particular posts
- Creating connections programmatically with common fields on CPT’s
- Allow viewing the edit screen for a post type, but not make/save/publish/update changes
- Control what custom posts a user can see
- Associate custom categories to different user IDs
- Display and Allow users to edit their own profiles
- Check in function on custom page
- WordPress and Unity high scores table
- Posts 2 Posts: query connected — orderby problem
- how to show Author post type count
- limit selection of custom taxonomies to one?
- Order custom posts by taxonomy?
- Pretty paged permalinks in custom post type loop
- How do I set the link in the Custom Post Type admin menu?
- After updating a page, all pages on the site used the index.php template
- Custom Tag Description unable to display just below and outside of the Loop
- Custom post type + category archive page
- Adding the_content() in custom template email
- My archive-posttype.php template is not loading
- Yearly Archive from a custom date metabox (Event Start Date)
- Add top-level menu pointing to a different custom post type?
- custom post type not getting archived?