Contributor has the following capabilities
- delete_posts
- edit_posts
- read
You can create the “Seller” role to have same capabilities as Contributor
add_role(
'seller',
__( 'Seller' ),
array(
'read' => true,
'edit_posts' => true,
'delete_posts' => true,
)
);
Warning from codex
NB: This setting is saved to the database (in table wp_options, field wp_user_roles), so it might be better to run this on theme/plugin activation
In functions.php
, you should use this in after_setup_theme hook.
EDIT
You can also create a user role who have same permission as another this way
add_role(
'specialuser',
__('Special User'),
get_role('seller')->capabilities
);
It will grant specialuser
same capabilities as seller
.
Related Posts:
- Post source link plugin – small modification
- Modifying Footnote Plugin for Descriptive Title Attributes
- How to Replace Words with Hypertext Link But Ignore Previously Existed Links?
- Edit Yoast SEO breadcrumbs output [closed]
- Redirect to another page using contact form 7? [closed]
- implement custom roles in custom plugin
- Post source link plugin – small modification
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- Adding discount functionality to the cart
- How to assign a specific service to a specific provider based on location
- Precheck fields when I add a new post
- working code, not working – Plugin Dev
- WordPress: code structure
- How to disable plugin capability : “create new category”
- Make plugin admin page visible to other roles
- How do I call wp_get_current_user() in a plugin when plugins are loaded before pluggable.php?
- Consuming an external API in WordPress?
- Shared functionality in plugins and themes
- How can I import a class privately into a plugin?
- Plugin update error message
- How to Loop Plugin Option Field Set?
- Can we completely remove the WordPress Sitemaps (WordPress 5.5)?
- Set a User as Author of all ‘New Posts’ posted
- HELP: Integrating WP with raw PHP code once published button is hit
- How to redirect Old Post URL to new Post and keep Old post Comments?
- I would like to use create a function in my custom plugin to tell WP to use a different header
- New Plugin: Post update pushes a copy as a revision
- bulk change of image setting “link to” to “link to: image url “
- Display a text message if the field is not found and not if found
- force customers to add only single item to card per purchase EDD [closed]
- How to get post URL in the_content filter?
- Auto delete WordPress users according to time
- add_query_arg not working
- Executing my function once on a specific time
- How to stop or remove an action being called inside a function of an extended class
- Theme my Login plugin, how to update fields
- Date calculations from 2 custom fields
- How would I go about creating a user ranked post popularity page?
- How to enable specific plugin only based around shop manager role?
- Adding a new field to the address field type in gravity forms
- Nested shortcode functions accessing variable
- Calling an attribute from a plugin shortcode
- Customize permalink wordpress category id
- WP Query. Is there a maximum size?
- Load Javascript from Plugin in One Page Only?
- Checking the count within a foreach loop
- Plugin Development – Functions or Hooks?
- wp_dequeue_script for a Plugin
- Need to replace Currency Shortforms
- Overriding an Array in a Plugin’s Class/Function from functions.php
- Customize Menu | Styling LESS/SCSS code formats
- How to translate wordpress error message
- Api external with wordpress
- All custom widgets are not showing in widget area at the same time
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- Change Header (Logo) Based on Login
- More gentle way to hook WordPress custom url
- How to add custom function to pluggable.php
- Checkbox show / hide output result
- How to keep plugin (media-sync) running even the tab is closed?
- Custom Logo Link WordPress
- How to convert Currency from USD to other IP Based currency in Php function
- How to get current cart values using WC_Shortcodes?
- Attempting to list all product categories and the price range of all products within them
- Creating an array from form inputs before it is posted to the options database
- adding dynamic/multiple slug values in ‘option_none_value’
- front end editor creation for Restropress plug in – displaying information from a WP admin area, on a different URL
- Move plugin pages from dashboard to front-end
- Cron job shedules replace?
- Is admin section completely customizable in terms of styling?
- How to make the first letter of a post title uppercase, in a plugin?
- Compare Ajax Data Results
- How can I make the search bar in my wordpress site search all of the pages rather than just the blog posts?
- Migrating custom php we wrote from functions.php into a site-specific plugin
- Nested DIV’s across functions in PHP, do not seem to work
- Every time I use wp_get_current_user() my plugin breaks
- Conditional required fields for WordPress Contact Form 7
- Cannot access variables within a widget
- Posting code inside the post instead of in the template file using shortcode
- WordPress function to add text
- Saving an array to get_options
- Saving plugin data returns “You do not have sufficient permissions to access this page.”
- Metabox Data not saving
- How to add a handler for a button in plugin?
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- Doing action based on input from options menu
- Including a PHP file via a function that is part of a plugin?
- How to delete remain data in WP database after deleting custom post via admin interface
- Move related products after product summary? [closed]
- How to tweak a plugin without preventing it from updating
- Adminimize Plugin — Is there an alternative to limiting Editor to ‘Appearance > Widgets’ only?
- Integrate Razorpay quick payments plugin with contact form7 plugin
- Woocommerce disable checkout on specific day
- Sync roles across several plugins
- How to Add Extra Text In WordPress Title Before Post Publish
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Option value not getting updated until page refresh in WordPress
- WordPress Convert queries to slashes using function.php
- WordPress Custom Page Blog Template Pagination Problem (Pagination Not Displaying)