Create Custom User Capabilities in WordPress

  Рет қаралды 11,242

WPCasts

WPCasts

Күн бұрын

In this video, I go over how to create custom user capabilities in WordPress and use them to display and hide content in the admin interface and backend.
💖 Become a Patron to show support & get perks!
/ wpcasts
Sign up for the newsletter. Free course coming in 2020:
wpcasts.tv
*SOCIAL*
Twitter: / alexanderbyoung
Facebook: / wpcasts.tv
#WordPress #User #Capabilities

Пікірлер: 29
@WPCasts
@WPCasts 4 жыл бұрын
Normally I would push either my Twitter or Patreon in this comment, but instead, I want to just wish you a wonderful week! You guys are awesome.
@dave28lax
@dave28lax 4 жыл бұрын
Thanks. It should be noted, don't leave the add_role/add_cap code in init after they are created. Roles and capabilities are saved in WordPress tables, so you only have to create them once. Personally, I usually create them in my plugin's activate function, or use WP-CLI "wp role create technician Technician" & "wp cap add technician read view_assigned_tech", or use a plugin like Members (deactivate when done).
@Kevin-nd6yd
@Kevin-nd6yd 3 жыл бұрын
Thank you for this. I learned a lot!
@michaelhofby
@michaelhofby 4 жыл бұрын
Omg dude :D This is EXACTLY what i needed of information for my website.. Thank you so much!
@Allformyequine
@Allformyequine 4 жыл бұрын
FANTASTIC video! Luving all of this! I'm am officially a WPCasts groupie! THANK YOU! Yay!! Amy :)
@theman7050
@theman7050 2 жыл бұрын
Amazing value again, Alex. Thank you for the great content. :D
@nirajsharp
@nirajsharp 2 жыл бұрын
Thank u it is what I m looking for 👍
@rafi_45
@rafi_45 3 жыл бұрын
best. thank you so much for this tutorial.
@13aaryan
@13aaryan 4 жыл бұрын
Was using User Role Editor Pro. Let's hope I get to remove it and do everything myself. Thanks!
@fab-abnoor
@fab-abnoor 3 жыл бұрын
i just awesome ... thank you very much sir for making this video
@ivanc.6064
@ivanc.6064 2 жыл бұрын
The "sup" in the beginning was intimidating
@alienheartz9163
@alienheartz9163 4 жыл бұрын
Hi WPCasts, you are amazing! Your videos really helped me and I improved my wordpress skill. Please make also some video about woo-commerce functionality. Best Regards!
@diegomauriciof
@diegomauriciof 4 жыл бұрын
Awesome stuff!! Thank you. Tech still can see the price in the dashboard, I think. How to restrict that?
@luzaanrock2537
@luzaanrock2537 4 жыл бұрын
Hi, Firstly thank you very much for your video's. I find them very helpful. My question is if I have built a process flow for specific functionality with plugins like elementary, acf and custom user roles etc. How can I package all of this so that I can deploy all together in another site? Almost like a plugin, but where it enables all the elementary, acf, cpt etc on one enable? Thank you in advance.
@Hsa008
@Hsa008 3 жыл бұрын
awesome
@stefanpfadt4353
@stefanpfadt4353 2 жыл бұрын
Really great! I have a search form on my website and I want some search fields only visible to certain user roles. Can I use your approach for that (changing some words in the code of course) or would I have to change the code alltogether? Might be a silly question to you but as a non-coder I am kinda lost :) I was thinking to use the get current user role then once thats done add an action: show or hide specific search fields...I dont even know what words to use for that - you use "echo" in your video is that the correct term? I would have tried show/hide or display....
@LevyCarneiro
@LevyCarneiro 4 жыл бұрын
Do you have a tip of how to create a simple workflow with Wordpress? For example, users with Role 1 can add Vehicles, users with Role 2 can fill out some details (text fields) to Vehicles. All in the backend, I mean.
@tanvir99991
@tanvir99991 11 ай бұрын
Hi, Is it possible to delete a built-in user capability of a premium theme? if so can you please tell me how to do that? i have tried maximum user role editor plugins but nothing worked. can you tell how to do that from theme file editor. i will be so grateful. Thanks
@stephenm3874
@stephenm3874 3 жыл бұрын
Great video as always, but I was curious as to why are you using leading underscores on your property definitions?
@WPCasts
@WPCasts 3 жыл бұрын
Hey Stephen, could you post the timestamp of the code you're seeing? It might help me with an answer.
@tylerd.8529
@tylerd.8529 11 ай бұрын
@@WPCasts On 2:03 e.g.: _('New Vehicle')
@stevensmek
@stevensmek 9 ай бұрын
Does this work for a wordpress network? Because I just tested, and my new user can't "do anything" in the back office haha!
@usmanahmed6985
@usmanahmed6985 4 жыл бұрын
Please create videos on creating custom login and signup pages.
@TanmoyDasIN
@TanmoyDasIN 3 жыл бұрын
Hello! After seeing one of your videos, I instantly subscribed to your channel and obviously I gave like to that video. Now when I followed this tutorial, I became stuck. First problem is after adding a new role and assigning a user to that role, when I tried to log in to the wordpress admin panel, it didn't logged in the back end, instead it went to the front-end. That new user cannot access the admin dashboard. Can you please help me with this?
@gavin7912
@gavin7912 3 жыл бұрын
Your custom post type is named "vehicle" and your capability type is also named "vehicle". Do these have to match?
@vcodev108
@vcodev108 3 жыл бұрын
When I add 'capability_type' => 'vechicle' the site custom post type just disappears from admin panel and it gets back when we keep 'capability_type' => 'post', can you please guide me.
@halfsmoke
@halfsmoke 3 жыл бұрын
Same for me, did you figure why it wasn't working?
@bestforyou5485
@bestforyou5485 4 жыл бұрын
cpu high usage when we post publish wordpress please tell me what reason
@TheMarouuu
@TheMarouuu 4 жыл бұрын
First! :D
Custom Bulk Actions and Admin Notices in WordPress
12:56
WPCasts
Рет қаралды 3,6 М.
Create & Edit WordPress User Permissions Using The User Role Editor Plugin | WP Learning Lab
9:57
WordPress Tutorials - WPLearningLab
Рет қаралды 79 М.
Wait for the last one! 👀
00:28
Josh Horton
Рет қаралды 124 МЛН
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Potapova_blog
Рет қаралды 17 МЛН
FOOLED THE GUARD🤢
00:54
INO
Рет қаралды 63 МЛН
Deploy Machine Learning Model Flask
29:00
Stats Wire
Рет қаралды 105 М.
User Role Management Introduction | WordPress
8:49
WPCasts
Рет қаралды 4,5 М.
Custom Queries In WordPress
14:50
WPCasts
Рет қаралды 19 М.
Introduction to JavaScript in WordPress
19:50
WPCasts
Рет қаралды 20 М.
Developing with user roles and capabilities
10:40
WordPress
Рет қаралды 589
Custom User Roles and Permissions using Plugin in WordPress
19:50
Properly Managing Your WordPress Plugins
8:26
WPCasts
Рет қаралды 12 М.
GPL Themes Vs NULL Themes - Difference between GPL and NULL Theme
15:12
DMarketing Wall
Рет қаралды 4,1 М.
WordPress User Roles Explained | And Change Capabilites
10:52
Matt - WPress Doctor
Рет қаралды 7 М.
ИГРОВОВЫЙ НОУТ ASUS ЗА 57 тысяч
25:33
Ремонтяш
Рет қаралды 303 М.
Игровой Комп с Авито за 4500р
1:00
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1,7 МЛН