I believe just one small edit to your code would get what you want. See if this works, just change the one if()
statement to the following:
if ( current_user_can( 'edit_posts' ) && $post_type !== 'avia_framework_post' )
Related Posts:
- Possible to hide Custom Post Type UI/Menu from specific User Roles?
- WordPress dashboard, viewing CPT results in 504
- Displaying Custom Post Types In “At A Glance” Meta Box
- Show Custom Taxonomy Inside Custom Menu
- Adding Custom Post Type Counts to the Dashboard
- How to Make an admin_notices Message That Disappears Once the User Leaves That Particular Page?
- How to Change the Title of a Meta Box on a Specified Custom Post Type? [duplicate]
- Adding help information to custom post edit page
- Display only custom post type count for current author on the “At a Glance” dashboard widget
- How can I show some description in the “All Posts” view of a custom post type in Dashboard?
- Add custom post types stats to a custom dashboard widget
- Sending an email when a CPT is saved/updated (NOT when it’s created)
- How to redirect wp-admin/index.php to a custom post type?
- Separate comment section for post type in dashboard
- right_now_content_table_end function not working?
- Customize the Dashboard Menu Editor
- filter custom post type by meta key in dashboard
- Team club with CPTs and user registration + user dashboard
- Cluster CPT posts to users based on ACF value from their profile on dashboard
- List Custom Post Types in Admin Dashboard
- Add data to post edit page, when post is published
- Modifying Dashboard edit.php
- Adding link to dashboard sidebar, nested under custom post type
- allowing custom user role to access custom post type in wordpress admin
- Slow CPT in backend
- How can i redirect click to new admin page not to edit screen in post table
- Metabox collapsed by default
- Custom page for creating/editing custom post type
- Help Adding filter to Add Media button for custom post type
- Custom user roles
- Add role privileges of the custom post type
- creating different edit screens for different roles
- Change column of row action (Quick Edit) links in WP_List_Table
- Allow certain part of a page to be easily updated for client?
- How can I make a custom post type that loops pages in a new dashboard page, each single page is a new dashboard page (all within the back-end)?
- empty dashboard for custom role
- Pagination with custom post type not working
- WP_Query() show posts that end later than today
- How to hide CPT files from media library programmatically
- Custom post types – RSS lastBuildDate issue
- Determine which template-{slug}.php is being loaded
- How to remove/hide elements from the admin menu?
- Show Custom Post Type by Author
- Archive page for taxonomy of custom post type
- CPT tax slug conflict with post type slug
- $wpdb returns no results with SELECT query on custom post type, works on default post type
- Exclude current post when getting related post on custom post type and taxonomy
- Upload Image from Front End and Resize
- Multisite with a single, shared custom post type, while retaining site URL
- custom post type default permalink
- Allow Administrator role access to custom capabilities [duplicate]
- Creating Multiple Loops in Genesis, One Post then 20, each with custom fields
- custom comments on specific post type
- wp_insert_post generates endless posts
- Adding dropdown select meta box to custom post type – seems restAPI is interfering
- Allow user to set custom order to a list of custom taxonomies?
- Crafting WP_Query array, sort by date
- WordPress wrapped added a span tag to every single p tag
- Custom Widget WP_Query problem
- Custom Fields for Custom Post [closed]
- Removed custom post type slug but not working for child pages
- Terms showing up in object cache on unrelated pages
- Show Custom Post Type meta boxes only on Page Edit
- using wp_update_post for updating custom post type
- How can meta boxes be added to “unknown” custom posts?
- link to a random custom post while excluding current post
- Custon Content within WordPress Loop
- How to group navigation items in the admin panel
- Create Array from custom post type to display a slider
- Creating a website with EVENT post type and PAGES as subpages of those EVENTs
- Fix permission error for deleting custom post from front-end?
- Custom post type slug 404
- Counts Posts ( custom post type ) by Author in author.php
- WordPress multisite – is it possible to have different taxonomies for each site?
- How to use a specific custom field in a custom post type as slug
- Wp custom post custom capability not working together
- Meta box not appearing in my custom post type
- Display Taxonomy Term Children in a Drop Down without Submit Button
- cannot achieve this structure (custom posts VS categories VS ??)
- Display CPT index page as front/home page
- Custom Post Type Meta Box Text Input Field Won’t Save When Blank
- How add column from new table in Custom Post Listing (admin)
- Home page is getting current-menu-item even if it’s not home
- no_rest_route in Unit Testing for REST endpoint for CPT registered via show_in_rest
- How to change URL for custom post type archive?
- custom post type – project link output via single-portfolio.php
- wp_get_nav_menu_items doesn’t return custom post type item
- Taxonomy counter on Taxonomy List(plugin)
- How to use a custom post type as child of a particular post of another CPT?
- Automatically Add a default category to a Custom Post Type before save_post action
- Capibilities of CPT WordPress
- Create Second Search Page Only for Custom Post Type
- How to make a shortcode for my WP_Query Loop? [duplicate]
- Custom post type permalink issue [duplicate]
- Custom Post Type Audio Content
- Post is not being published after clicking on Publish button in Custom Post Type
- How to create content automatically when a post is published?
- Updating User Meta from Custom Post Field Upon Publish Not Working
- Pagination not working with custom loop
- Catergory args causing loop not to show