You should make a verification on the front-end to see if the user has the role ‘pro 1’, ‘pro 2’ or whatever.
Like:
$user = wp_get_current_user();
if (in_array( 'pro-1', $user->roles)):
//whats this user can see
elseif (in_array( 'pro-2', $user->roles)):
//whats this user can see
else :
endif;
If you are using a template, you can try adding this on the top of your code:
global $authordata;
global $post;
setup_postdata( $authordata );
Related Posts:
- Submit post and upload image from front-end
- How to set a custom post type to not show up on the front end
- Front end post editing using a form
- Correct Post Count ( All | Published | Drafts | Pending | Trash ) for Custom Post Type when restricting to view own posts
- Add custom post type items from frontend
- Front end registration/login & publish/update 1 custom post
- List custom post types in dropdown
- How I upload, save and set a featured image from my frontend?
- Trying to save custom post type from frontend partially working
- Reason action hook won’t work with update_post_meta from frontend form? Alternative?
- front end radio custom taxonomy with custom post type
- Assign category to front end post
- Front end post form won’t post categories to custom post type
- Create and edit posts from front end
- Make custom post type display as a page
- Frontend Form for Custom Post Type
- Upload Image from Front End and Resize
- Frontend posting – everything saves other than checkboxes?
- I am having a problem with form updating/editing WordPress post on the frontend
- WordPress Create Post from front-end
- wp_set_object_terms() not adding new term to custom post and custom taxonomy
- How to restrict CPT post’s fronted view only for specific user roles?
- How to save custom taxonomy from front end post submission
- Insert Custom Post Type data from the front-end by a user
- Crafting WP_Query array, sort by date
- Posting to a Custom Post Type from front end – user generated content
- How to get the upcoming post ID from front end?
- How to make front end form only accept certain values
- Custom Post Type & Meta Box – Displaying meta box information on front end?
- How To Import CPT With Only Few TEXT ACF Fields From Front End?
- Submitting Custom Post Types with custom fields from Front-end form
- How to properly delete custom post type posts programmatically
- Get id from metabox dropdown
- Get admin area editor in frontend
- Better approach for a WordPress Inventory
- Display custom meta on page that has been check in custom post type
- How can I lock specific posts (cpt’s) from editing by anyone other than ADMINS
- Update ACF fields on a frontend form? [closed]
- Add term for custom taxonomy from front end
- Post visibility option to theme front-end for author to select?
- display custom portfolio tags
- Plugin needed to allow subscribers to post articles on the front end without admin approval [closed]
- How to create Custom image post?
- Front-end Image Upload to Custom Meta Box
- Show/hide posts and categories based on user meta
- Preview url not working outside wp-admin
- Change custom post taxonomy values from front-end
- Saving Child Terms on front end not setting parent
- Multi Photo Upload with Caption on Front End for Custom Post Type
- Front End users account with lots of user Roles (not Woocommerce)
- Show “Republished” badge when Post Date is manipulated
- Multiple domains, Single database, 1 Parent/Master with all content, other domains/slaves with filtered content (based on “location” variable)
- Getting Custom post category from Form
- Add a meta to custom post type which corresponds to a particular taxonomy
- Add a image to a post published on a CPT from the front-end
- Extensive search filtering and results->PDF in the front-end
- Front end page submission form does not attach custom post type
- Issue with permalinks for custom post type
- Front end Submit not posting to Custom Post type
- Check in function on custom page
- create category upon saving post and save post in that category
- Front end post or photo or both
- remove pagination from a single blog entry
- How do test if a post is a custom post type?
- Remove the “View” Link in Post Admin
- Custom post type Vs. data in own table
- Customize Search to only search current custom post type
- Jetpack infinite scroll render – make different depending on post type?
- Custom Post type taxonomy single templates
- List custom post type but redirects to home page
- How to search CPT’s by meta query from the admin dashboard?
- How to get category image custom post type taxonomy in wordpress?
- Integrating Orbit slider into wordpress through custom post type
- how to get archive urls with same origin for custom types and terms?
- Editable Meta Data for Custom Post Type Archive Template
- Filter by custom taxonomy slug on a custom post type
- Create 3 Level Relations with ACF and WordPress
- Why does wordpress keep adding postname to my CPT’s permalink in the end?
- Archive page for taxonomy terms
- Custom Post Type Set Comments ON by default without show METABOX
- Custom post type and taxonomy permalinks
- re-register custom post type with custom capabilities
- Only show posts with date of today or in the future (i.e don’t show past posts)?
- Unable to display selected post title in frontend from metabox wp_dropdown_pages()
- Get Posts by Category, Tag , and CPT Taxonomy
- Custom Post Type – Rewite Archive page
- how to retain the ability to modify the post slug after applying a post_type_link filter?
- Removed custom post type archive page shows blog page
- Getting Twitter Content on My Blog
- Filter posts by specific custom category and current tag
- Custom Post Types – Taxonomy and Customization
- WordPress REST API V2: “{CUSTOM_POST_TYPE} matches Term ID List and Term ID Taxonomy Query, but should match only one.”
- How to change Elementor Template for Single Page Post on Load
- Custom query using one category that is used in all custom post types
- tax_query not working?
- Iterating over custom post type archive returns incorrect first ID
- WordPress Custom taxonomy template
- Repeatable custom meta select boxes
- ACF Field to set Publish Date – Post Duplication upon Update
- Is it possible to make is_category() recursive?