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 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
- Debugging Technique Question re: functions.php
- Scope for PHP Variables Assigned in functions.php or a plugin
- Override the filter from plugin in child theme
- force customers to add only single item to card per purchase EDD [closed]
- How to get post URL in the_content filter?
- Add a plugin before main container
- How to get subscription key or id using Woocommerce Subscriptions [closed]
- Missing argument 3 for wp_register_sidebar_widget()
- Auto delete WordPress users according to time
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- add_query_arg not working
- Shortcode button dosent work for all posts. Work for first post only
- Executing my function once on a specific time
- How to stop or remove an action being called inside a function of an extended class
- wordpress plugin is not activating from widget
- 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?
- Override Plugin Script Fucnction in WordPress
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- Adding a new field to the address field type in gravity forms
- Replacing a plugin function with a custom renamed function doesn’t work
- Nested shortcode functions accessing variable
- Calling an attribute from a plugin shortcode
- How to call WordPress function other files
- All sites themes functions.php have been changed
- Customize permalink wordpress category id
- Conditional attributes and logic per product category
- WP Query. Is there a maximum size?
- WordPress get_avatar function not correct working
- What is @Action in WordPress?
- Load Javascript from Plugin in One Page Only?
- Inserting custom PHP script on homepage
- Check if variable is set in filter
- Checking the count within a foreach loop
- execute function after one completed
- Plugin Development – Functions or Hooks?
- JQuery prepend a function
- Why can’t I call a (member) function from within a foreach?
- Are there action hooks for comments?
- Help with WP Business Directory Manager Plugin?
- wp_dequeue_script for a Plugin
- Need to replace Currency Shortforms
- wp_enqueue_scripts
- Return multiple values in a shortcode attribute
- get specific value of a array | PHP
- How to get specific string/value from an array? php [closed]
- How to make a dynamic css class whose name changes every visit to confuse scraper
- Plugin onclick button activate other plugin
- WordPress Stock Update Programatically
- Loop in elementor custom widget not working
- How can I fetch data from another website to my wordpress website with mysql database
- I am trying to make a field show and save from quickedit screen
- Overriding an Array in a Plugin’s Class/Function from functions.php
- Send email with list of active plugins upon activation/deactivation
- Using custom fields for image alt and title
- Getting a ressource ID, from a WC_Order_Item_Product/Order
- .php file for woocommerce edit category? [closed]
- 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
- Why is it important to check for isset and is_array before checking in_array in this example?
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- Change Header (Logo) Based on Login
- how to change wp-admin url using function file
- Add the_post_thumbnail_url to a shortcode in function.php
- Calling a save function from a “submit” button
- 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
- What can I do to customize a widget provided with this plugin? from where have I to start?
- Requires PHP version 5.3.0
- PHP if url extension action=discussion condition use [closed]
- Adding a script & php to functions.php
- PHP Creating a formula from mysql db values and db stored math operator
- 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?