I don’t see this as excessively heavy. Just use is_user_logged_in()
and current_user_can()
. Obviously if user isn’t logged in then you can skip checking for any roles. I am not sure, but user data is probably held in memory so there will be no extra database calls and such.
Related Posts:
- Taxonomy, Terms, and Template Files
- Exclude a category from WP_Query
- Check if post type has term
- How do I Filter Custom Post Type by Custom Taxonomy in the newest WordPress RESTful API?
- Custom taxonomy not showing up when adding a new custom post type
- query multiple taxonomies
- wp_set_object_terms() is not replacing term, but creating a new one
- How to list all categories and tags in a page?
- WordPress custom taxonomy URL rewrite on spelling errors
- TV Show database – Best way for structuring it?
- Create an archive page for custom taxonomies
- WordPress Search documentation: how to improve search query using taxonomy terms, custom meta fields?
- custom post type taxonomies UI radiobuttons not checkboxes
- Custom Post Type Archive Template
- Order posts by (hierarchical custom) taxonomy terms and term children
- Remove base slug in CPT & CT, use CT in permalink
- Add the .html extension to custom post types
- Dynamically create/remove terms in taxonomy when custom post type is published/trashed
- After deleting a post are terms, and custom meta deleted?
- Show metabox in custom-post-template depending on taxonomy term?
- Custom Permalink for Taxonimie and Custom Post Type
- Adding the taxonomy before the custom post type
- Menu Multiple Taxonomies
- Add Tags to custom post type
- Custom Taxonomy term archive template
- Custom page template for category taxonomy
- Permalink Structure CPT With Custom Taxonomy Fails
- WordPress as Wishlist Application
- How do I create filters for custom post types?
- get_object_taxonomies() returns empty array for custom post type
- Display all posts in main category and 1 subcategory
- Multiple portfolios and single item in two of them (ideas?)
- Pagination for Custom Taxonomy Page [duplicate]
- Custom taxonomy rewrite give pagination 404
- Display custom post type category, while in a CPT category, then the posts beneath
- Why are taxonomy terms not saving when using custom meta boxes with radio button taxonomy selectors?
- Hide post navigation if current post is in a category with only one post
- Customize Custom Post Type URL
- I want to change the word “Tags” in WordPress to something else, but how?
- How to have this permalink structure: post_type/postname/custom_inner_page
- Set post terms for multiple posts
- Custom permalink with child taxonomy terms
- Display Registered Taxonomies
- Custom Taxonomy Not Showing in Front-End When Outputting a Custom Post Type with WP_Query()
- comment_notification_text filter for custom post type
- Pagination Not Working for Custom Taxonomy with Custom Query – 404 Error
- Custom Taxonomy Is Being Pulled into a Page, But It Doesn’t Have A Hyperlink
- Querying two taxonomies with tax_query not woking
- Display custom posts randomly in custom taxonomy archive
- WP_Query parameter conflict
- CPT Taxonomy As Archive Page – Error 404
- How to get all posts related to particular category name on button click?
- List all Custom Post Type posts excluding certain Taxnomy term
- Display custom posts for each category from its custom taxonomy
- Get custom category ID of current custom post within the loop
- Can’t pull posts of a Custom Post Type based on the custom taxonomy of the CPT
- Conditional Statements
- Custom post type specific category box
- Making a form for user to add new custom post with custom taxonomies and custom fields
- Get newest created custom category (get_term_by and variables) (outside Loop)
- Custom Taxonomy Taxonomies of Same Name point to first created URL
- Displaying custom taxonomy menu in custom post type archive
- Custom post types templates
- prevent sub categories to show up
- Taxonomy terms with the same name are updated between separate custom post types
- Custom taxonomy permalink without term, redirection to CPT slug
- Custom post type category link redirecting to 404 page
- Custom Permalink For Custom Post Type – Working Fine But Broken For Pagination
- Archive page URL for custom taxonomy and post type
- custom post type and a “sticky” position taxonomy
- Display post count for a specific month
- Custom Post Type Archive Page showing as 404
- Create custom post type categories
- Multiple Custom Post Type in Taxonomy Archive Causing White Screen
- Adding a Section for Visitors
- How can I get the last 5 element of this tax query?
- Add other all taxonomies as meta boxes to custom post type
- How to get post type archive category title
- Remove CPT Slug with 2 taxonomies and 1 post meta
- URL with Hierarchical Taxonomies and same slug for all terms and sub-terms
- order taxonomy alphabetical
- Custom post type archive page not showing on archive-posttype.php
- Should I make a taxonomy to organize data like this?
- Custom Post type and Taxonomy in post URL error
- Display Custom taxonomy, Child terms and posts in a template Under Specific Parent terms
- Associate custom categories to different user IDs
- List all posts from custom post type by taxonomy
- archive-{custom_post_type}.php not getting recognized wordpress
- How to retrieve the permalink for a specific (custom) term?
- Sort a custom post type loop by a custom taxomomy instead of chronologically
- changing post type in loop query
- Taxonomy and Rewrite Structure
- Pagination for a Custom Taxonomy
- Trying to create hierarchy between 3-4 custom post types
- How to Create Custom Post Type with Multiple Color Options?
- Add custom taxonomies as class names to an archive page of custom post types
- Custom Post Type Base URL
- Only One Post of Custom Post Type Appearing on Template Page
- Code to show related posts (custom post type and custom taxonomy/category) is messing with other code
- Permalinks for Custom Post Types and Taxonomies