Create Custom User Capabilities in WordPress

Поділитися
Вставка
  • Опубліковано 7 вер 2024

КОМЕНТАРІ • 29

  • @WPCasts
    @WPCasts  4 роки тому +13

    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 роки тому +2

    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 роки тому +2

    Thank you for this. I learned a lot!

  • @13aaryan
    @13aaryan 4 роки тому +2

    Was using User Role Editor Pro. Let's hope I get to remove it and do everything myself. Thanks!

  • @Allformyequine
    @Allformyequine 4 роки тому

    FANTASTIC video! Luving all of this! I'm am officially a WPCasts groupie! THANK YOU! Yay!! Amy :)

  • @nirajsharp
    @nirajsharp 3 роки тому

    Thank u it is what I m looking for 👍

  • @michaelhofby
    @michaelhofby 4 роки тому

    Omg dude :D This is EXACTLY what i needed of information for my website.. Thank you so much!

  • @ivanc.6064
    @ivanc.6064 2 роки тому

    The "sup" in the beginning was intimidating

  • @theman7050
    @theman7050 2 роки тому

    Amazing value again, Alex. Thank you for the great content. :D

  • @fab-abnoor
    @fab-abnoor 3 роки тому

    i just awesome ... thank you very much sir for making this video

  • @rafi_45
    @rafi_45 3 роки тому

    best. thank you so much for this tutorial.

  • @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 роки тому +1

    Awesome stuff!! Thank you. Tech still can see the price in the dashboard, I think. How to restrict that?

  • @Hsa008
    @Hsa008 3 роки тому

    awesome

  • @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.

  • @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....

  • @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.

  • @tanvir99991
    @tanvir99991 Рік тому

    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 Рік тому

      @@WPCasts On 2:03 e.g.: _('New Vehicle')

  • @stevensmek
    @stevensmek 11 місяців тому

    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.

    • @nigel_decontie
      @nigel_decontie 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