Template Tags for the rescue
-
Only logged in users:
is_user_logged_in()
-
Only logged in users that have a certain capability assigned to their role
current_user_can($capability)
-
Only logged in users that have a specific role assigned
current_user_has_role($role)
-
Only logged in users that have a specific capability assigned (to their role) on a specific blog
current_user_can_for_blog($blog_id, $capability)
Related Posts:
- How do I require authorization / login to view a specific set of posts / pages?
- Set posts of a custom post type to be private by default?
- Fetching private posts or custom post types via WP-API with basic authentication
- Disable comments from showing up public for Custom Post Type
- Making a Custom Post type only visible to non-users via a specific link
- Comprehensively Restrict Post Type Taxonomy to Logged-in Users
- query private custom post type
- How do I display content to users who are not logged in instead of 404 on Private custom posts?
- Custom post type permalink returns 404 when set to private
- Have custom post type Visibility be private by default, and have radio button also set to “Private”
- Forcing two or more custom post type to be private
- How can I incldue a “private” post type in a loop for public users?
- Get category id from post id of a custom post type
- Custom Taxonomy as Dropdown in admin
- How to call a custom post with get_posts() instead of query_posts()?
- Hide custom post type field from author?
- WordPress Custom Post Type is Matching on Partial Slug
- How to disable a Custom Post Type Feed?
- Permalink for CPT with taxonomy
- One of two Custom Post types not being registered
- How to create custom URLs for Custom Post Type sub sections?
- Add filter to wp_list_categories and query what type of taxonomy-terms it use?
- Custom post type category, taxonomy and URL rewrite problem
- Trying to save custom post type from frontend partially working
- How can I remove categories in menu in custom post type?
- Include both default and Custom Post Type in query modified inside pre_get_posts
- Custom Post Type: How to display all of same taxonomy?
- How to use different featured image size for a custom post type?
- Adding help information to custom post edit page
- Custom Post Type Navigation on Custom Field
- Can’t get order_by meta_value_num to work properly
- Is it possible to place custom post type files inside a folder in theme directory?
- Post Type Description for ‘Posts’
- Custom Post Type – List all attachments on Edit Screen
- Dynamically creating custom post type items and updating them
- Custom post type title is set by other custom post type
- Conditional Statement custom post type category
- will post_id ever change? Can I safely use post_id for custom queries?
- I have a custom post type with many posts. How do I split the list into multiple pages?
- How do I require the specification of term in a custom post type and custom taxonomy?
- Custom Post Type URL Change – (portfolio using portfolio categories) [duplicate]
- don’t publish custom post type post if a meta data field isn’t valid
- How to handle large number of images in a post?
- Proper way to display latest 5 posts grouped by post type?
- Editor / Add Media: Is it possible to only allow galleries?
- Check IF single OR multiple custom data has been entered
- get_pagination not working on a custom post type query (using WP_Query)
- How to Make infinite loop of post
- CPT is simply not displayed in the main archive with “pre_get_posts”
- How to display hierarchical and non-hierarchical taxonomies?
- Can’t access private custom posttype single- or archives-page
- Modifying the default post from wordpress
- Cannot obtain custom meta information
- Exclude latest post from WP_Query taxonomy term loop
- Add custom columns in custom post type browse page
- the ‘save_post’ event triggers when I want to start a new post
- Getting custom post type author and date published
- Custom permalink structure for remote content pages
- Find custom post type url by author
- How to show all CPT posts in one page?
- how can i show a google map in custom post type
- Adding an extra parameter [string] to my posts’ permalink?
- Query Custom Post Type based on text input
- Empty meta-box returns publishdate if no value is set?
- Permalinks not working (404) for the ‘item’ post type
- Combine 2 different custom post slugs into a single permalink?
- Display category name of custom posts only once in the loop
- Metaboxes inside Tab
- Virtual page and loading template
- Template for Custom Post for the EDITOR
- How to hide bottom navigation (previous/next post) in Custom Post Type plugin in WordPress?
- WP_Query: how to search tags in addition to a custom post type?
- WordPress URL rewrites using Advanced Custom Field
- How to display custom post type taxonomy in Contact Form 7 text field
- Custom post type author issues
- Custom Taxonomy Page
- Don’t share custom taxonomy terms if applied to multiple Custom Post Types
- How to show custom post count in archive page
- How can I prevent the admin to create a new custom post type more than one?
- How to prepend text to custom field value A, but only if custom field value B matches a certain string?
- Custom Taxonomy is disabled on Edit page
- Creating multiple CPT posts from one Gravity form
- Not Able to Display Metabox Saved Checkbox and Selected option After Save/ Update
- Function not pulling image or text from custom post type
- category page template for custom post type
- Delete attachment with post
- Get link for feed of specific post type AND taxonomy
- Need an idea about how to open a popup which contain only post created form in wordpress admin
- Copying custom field value in to title
- Get single object term for custom taxonomy
- Sorting custom post types by taxonomy (So close)
- Return Custom Post Type Categories
- Associating post id with its post type
- Types plugin isn’t compatible with my custom post type
- Show Posts in Vertical Tabs with Scrollbar
- MF2 and qTranslate problem with custom post types post titles [closed]
- img src not working correctly in custom post type
- ACF Relationship: Group posts by parent category term, then child [closed]
- Why custom search engine only searches in post titles of custom posts?
- Send email on creation of custom post type and use get_post_meta()