@PieterGoosen is cool, and still awake like me and answering like boss.
To simplify his code and make it work to this specifically without a bunch of junk on your page:
/**
* Pieter Goosen writes awesome code
*/
add_filter( 'register_post_type_args', 'change_capabilities_of_the_custom_css_js_posttype' , 10, 2 );
function change_capabilities_of_the_custom_css_js_posttype( $args, $post_type ){
// Do not filter any other post type
if ( 'custom-css-js' !== $post_type ) {
// Give other post_types their original arguments
return $args;
}
// Change the capability_type of the "custom-css-js" post_type
$args['capability_type'] = 'manage_options';
// Give the custom-css-js post type it's arguments
return $args;
}
The plugin you have chosen is written in a broad way. It has some insecurities.
Related Posts:
- Add Capabilities to Custom Post Type after it has been created [duplicate]
- Multiple useres editing specified content
- Allowing custom role access to custom post type in back end
- Defining capabilities for custom post type
- Can I make user role that can only access a certian content type?
- echo value from ‘select’ field type into page template using cmb2?
- REST API: How can I restrict a custom post type to only be accessible by authenticated users?
- Customize users’ capabilities to change a custom post’s post status
- How often do you need to register_post_type?
- How to set individual capabilities on a taxonomy? Or how to re-register an existing taxonomy?
- Custom Post Type Capabilities — Enable Edit, Disable Create and Delete
- Include images from pages in wp search.php results in default wp search
- List events by month
- How to restrict specific post types from being read or added by specific user roles (eg. author)?
- Maintaining WP_Query Relation Among CPT, Custom Taxonomy, Permalinks- CPT UI
- Remove POST_TYPE from custom post type permalink
- WordPress capability_type arguments
- Change upload_dir folder at a certain cpt but cant change back
- Best practice for adding posts in bulk
- Limit access to page depending on user level
- Custom Role for CPT Only
- Allow Administrator role access to custom capabilities [duplicate]
- how to add extra meta box or textarea into custom post types
- Can’t get order_by meta_value_num to work properly
- How to quickly reorder posts in the admin panel that will persist for the wp-api
- check if post title in a custom post type exists in page
- How to hack YARPP plugin to find related posts for custom post type?
- Show listings from Impress Listing plugin in random order using taxonomy and terms
- One-to-many post relationships that are displayed by category (using posts-to-posts plugin)
- WordPress theme custom capabilities not works
- Custom posts don’t work
- How to restrict CPT post’s fronted view only for specific user roles?
- single-{cpt}.php ignored
- current_user_can() return FALSE but debugging says TRUE
- Insert and then update post_type by wp_update_post
- Custom Post Type Capabilities
- Custom Post Types. Are there any disadvantages/advantages in using a plugin to develop them?
- Custom post types as sub menu pages and role capabilities issue
- How to set individual capability of post type in individual category
- How to set a CPT to have a page as a parent, then rewrite urls accordingly?
- WooCommerce Customer Role Delete Custom Post Type
- Addition of custom option panel crashes Media Library & Admin Area
- Send notifications to custom post author when custom post is edited
- Post injections into Site Origins Page builder [closed]
- Custom Post Type + Categories
- WordPress randomly shows 404 errors
- Disable user from updating certain posts
- Access to CPT but not to ‘post’ post type
- Custom Post Type slug same as page name
- How to Get WordPress custom post data in WooCommerce product meta panel? [closed]
- Shortcode for CPT post content in a page
- Organize WordPress site, so it can maintain with huge database
- To use custom post types, or not to use
- Autocomplete or suggest from post titles inside plugin
- WordPress custom post type capabilities issue
- Pods CMS: How to add custom column to Adnvanced Content Type
- Pagination hitting 404 page on /page/4
- Capabilities not working with custom post type
- Override Plugin Custom Post Type ‘single’ view
- Add custom columns in custom post type browse page
- Custom Post Type – after disable ‘Add New’, I can’t edit and delete post
- Validate Custom Post Type fields
- Wp custom post custom capability not working together
- How can I modify a custom post type and custom page template for a child theme if all content seams to be handled by theme’s ‘native’ plugin?
- Custom Plugin – Query CPT – Display Results
- Plain links in single-class.php and archive-class.php not working
- how can i show a google map in custom post type
- Why “Mine” is the default view when adding ‘capability_type’ in register_post_type
- How to only display all posts to a custom User Role?
- Set a template on a custom post in the plugin
- Custom Post Type Capabilities Singular/Plural
- Simple way to hide\show an announcement (just a div) on homepage?
- Why is this function so slow?
- Permalink URL connection between two custom types
- Taxonomy counter on Taxonomy List(plugin)
- Is it possible to arrange Custom Post Types from CPTUI into a Folder?
- Filter Custom Post Type Posts by Taxonomy
- Insert custom taxonomy into category query
- Custom Post Type single post type shown in theme single.php
- Include images from pages in wp search.php results in default wp search
- Capibilities of CPT WordPress
- Populate metabox dropdown with post title from another Custom Post Type (issues with wp_reset / global $post)
- Enable shortcodes on custom post type
- Best Plugins for Complex Index of Resources [closed]
- How to display all custom fields associated with a post type – IN THE ADMIN AREA?
- WP_Query return highest number only
- Display subcategories in the filter on CPT
- Remove Custom Capability
- How to display custom post type in a submenu?
- Plugin Error on activating
- Custom Post Types in plugins?
- Plugins for putting Custom Post Types into the Menu
- Custom role, capabilities, and post type: preview button wrecks things
- Plugin – read post into blank page [duplicate]
- How to Create Short Code Using Custom Post type
- How to hide home title on pages and posts?
- WP_Query is getting the post but the_post() not rendering any Post
- Custom Post Type to Plugin
- Woocommerce product page is not showing custom css [closed]
- How to get ‘Products’ on home page?