How to create a WordPress Gutenberg Custom Block

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ธ.ค. 2024

ความคิดเห็น • 123

  • @jherbison
    @jherbison  2 ปีที่แล้ว +18

    Let me know here in the comments what type of Gutenberg Blocks you need/want to create. I may chose one to create a video about. Love you all.. Thank you so much for watching, subscribing and commenting!

    • @lumovox
      @lumovox 2 ปีที่แล้ว +5

      Could you explain how to add image upload button and repeater fields? Thank you for great job

    • @ayesayrelax3136
      @ayesayrelax3136 2 ปีที่แล้ว

      Can you do pdf Download list custom block please

    • @alreadyghosts7727
      @alreadyghosts7727 ปีที่แล้ว

      Excellent vid! I am totally new to custom WP blocks. Can you do one or recommend one for a simple block in the footer that can grab and display data from another site, such as the author's stats from a leaderboard on another non-WP site?

    • @mushabmithawala7553
      @mushabmithawala7553 ปีที่แล้ว

      @@lumovox have you found such this kind of block?

  • @johnpearcey
    @johnpearcey 2 ปีที่แล้ว +18

    All the official WP tutorials and docs have you setting up dev environments, docker instances, node and all sorts of BS. The generated code is incomprehensible. They have no idea what a tutorial actually is. This video gets straight to where we need to be with all the most important aspects explained and a nice small working example which anyone can understand. Well done Joshua. Top marks.

    • @jherbison
      @jherbison  2 ปีที่แล้ว

      Thank you!

    • @SkyrimBeast
      @SkyrimBeast หลายเดือนก่อน

      I remember reading through those docs too. After about 10 minutes, I said "NO thank you".

  • @ToniQuiñonero-n2z
    @ToniQuiñonero-n2z ปีที่แล้ว +3

    Man you literally blew my mind!!!!! this is exactly what I was looking for

    • @jherbison
      @jherbison  ปีที่แล้ว

      Thank you for watching and commenting.

  • @nexTabDE
    @nexTabDE ปีที่แล้ว +2

    As someone that is used to extending WordPress with shortcodes and that knows their way around PHP, but not so much JS, this was very helpful to finally getting started with Gutenberg blocks.
    With some more help from ChatGPT, I was able to extend your example and create a block that would output some dynamic contents courtesy of PHP. This will hopefully allow me to create more user-friendly backends for my clients, because adding a couple input fields should be better than adding 5 different attributes to a shortcode. 🙂

    • @jherbison
      @jherbison  ปีที่แล้ว

      Awesome! Thanks for watching and commenting.

  • @andreranulfo-dev8607
    @andreranulfo-dev8607 2 ปีที่แล้ว +4

    19:39 Just WOW!!! A real life saver!!! I know react, but this Babel really saves some time!! Thanks a lot!

  • @kensleylewis
    @kensleylewis 2 ปีที่แล้ว +5

    I don't know why, but your process on creating blocks has been the easiest and most intuitive process I have found in the past 3 years. It makes these "no-configuration" packages off of github look over-bloated. In regards to css, I'm assuming that all I would need to do is create a node_modules environment in the same plugin area, to convert my scss sheets to css and then connect them to the block project. Feels very easy. Many many thanks on this!

    • @jherbison
      @jherbison  2 ปีที่แล้ว +3

      Thank you very much for the compliment. If you are using VS code or Sublime, there are packages that convert your scss to css. You can enqueue those files into the php file of this plugin. I have that video to make next, but trying to find the time to do it. Been traveling a lot lately and haven't been able to get the time to make the followup video.

    • @nexTabDE
      @nexTabDE ปีที่แล้ว

      What @jherbison said; personally, I'm using "compile hero" (they renamed it to "SASS/LESS/Stylus/ [...] compiler", the name is now quite a mouthful) and it gets the job done beautifully. I'm only using it for SCSS to CSS conversion. For it to work, you need to open a folder rather than "just" the files, this is one of the common mistakes, but after that, it tends to do exactly what you need it to do. 🙂

  • @xuyennguyenthi1274
    @xuyennguyenthi1274 2 หลายเดือนก่อน

    Thank you for the great tutorial 👍

  • @tevfik7
    @tevfik7 ปีที่แล้ว +1

    These videos are golden. Thank you for everything

    • @jherbison
      @jherbison  ปีที่แล้ว +1

      Thank you. Glad you like them.

  • @logimw
    @logimw ปีที่แล้ว +1

    I'm not a wordpress fan, but sometimes I have to develop something there, so I'm glad for videos like that one - explaining how to do low-level stuff with awesome lib like react. Well done

    • @jherbison
      @jherbison  ปีที่แล้ว

      Thank you. I am not a fan of react, but it is what WordPress is using more and more.

  • @MahmoudSaadawy
    @MahmoudSaadawy ปีที่แล้ว +2

    Stunning really 😍 Could you please upload part 2 😢 and plan part 3.
    I used to hate blocks really cuz the official documentation sucked. But now - thanks to you - I finally get it. ❤

  • @plakadiva
    @plakadiva 2 ปีที่แล้ว +1

    this is probably the best "getting started" developing blocks especially because you didn't use build tools, now I understand it much better and ask myself if i should use build tools at all... If you are planing to make more video-tutorials about Block development, i would love to see your kind of teaching blocks with dynamic content

    • @fahadus
      @fahadus 2 ปีที่แล้ว +1

      I agree. A lot of the times they can really slow you down. Unless you're doing a complex project, you likely don't need any of that. The less friction, the better.

  • @kirilltyrov8791
    @kirilltyrov8791 2 ปีที่แล้ว +4

    Thank's for tutorial! I want to see about custom plugins and themes development wordpress! Really interesting!

    • @jherbison
      @jherbison  2 ปีที่แล้ว +2

      Thank you for watching and commenting.. I have videos about plugins and themes on my channel.

    • @kirilltyrov8791
      @kirilltyrov8791 2 ปีที่แล้ว +2

      @@jherbison Great, I'll see! Continue please this!

  • @nicolasreitin8397
    @nicolasreitin8397 10 หลายเดือนก่อน

    Hi Joshua, thanks for your great tutorial.

  • @cholo2605
    @cholo2605 8 หลายเดือนก่อน

    Thanks a lot for these useful information🤩

  • @anirudhachakrabarty2050
    @anirudhachakrabarty2050 ปีที่แล้ว +2

    Can you post the link of the next video regarding styling and other stuffs? Really awesome and easiest way you described here.. enjoyed this video...

    • @mayrazamudio9914
      @mayrazamudio9914 ปีที่แล้ว

      Yes, can you please post the styling video?

  • @al-thaidi
    @al-thaidi 2 ปีที่แล้ว

    Thanks a lot Joshua! You made it seem so easy and approachable.

  • @pabloeduardoibanez
    @pabloeduardoibanez 2 ปีที่แล้ว

    You are the best Joshua thanks!

  • @darrenforster99
    @darrenforster99 ปีที่แล้ว +1

    Thanks, that's great - just started using wp a bit after developing some stuff for Joomla so good to see how to create those custom blocks for the block editor.

    • @jherbison
      @jherbison  ปีที่แล้ว

      Awesome. Thank you for watching and commenting.

  • @nnwebdigital
    @nnwebdigital 2 ปีที่แล้ว

    Hello Joshua! That was a great tutorial. I'm waiting for the next one.

  • @dmarushchak
    @dmarushchak 2 ปีที่แล้ว +2

    As always great tutorial, thank you

  • @thebilalafsar
    @thebilalafsar 10 หลายเดือนก่อน +1

    Hey, it's 2024, and it looks like your video needs an update. There are tons of new features in WordPress. How about kicking off a WordPress series, covering everything from the basics to custom theme and plugin development, security, speed optimization, and more? I'm a 20-year-old from a poor family in India, working on building my career. Your updated tutorials or a new series would be super helpful. Thanks and lots of love from India!🇮🇳❤

  • @jimlanpheer5281
    @jimlanpheer5281 ปีที่แล้ว +1

    Awesome, this was a great tutorial for me, it opened up a lot of areas to explore. I hope that you did do the video you mentioned 'doing next' about styling, because i'll be really interested to check that out as well. Many thanks!

  • @JilaniAhmed
    @JilaniAhmed 2 ปีที่แล้ว +5

    Thank you dear Herbison for the great tutorial. Please create some image, conditional and repeater field tutorials. Ex. if the field is blank it should disappear. Thank you again :)

    • @jherbison
      @jherbison  2 ปีที่แล้ว +2

      Thank you for watching and commenting.. I am hoping I can get a couple of videos out this week to answer some of those questions.

  • @theman7050
    @theman7050 2 ปีที่แล้ว +2

    Consistent quality ✌🏼

    • @jherbison
      @jherbison  2 ปีที่แล้ว +1

      Thank you so much!!

  • @ЗаблокироватьГлобальныйПидарас

    Joshua, where are you? Could you do more lessons about custom plugin and theme wordpress development? I want to learn how I can do mini- classified dashboard plugin with on wordpress

  • @boxoffisa
    @boxoffisa 2 ปีที่แล้ว

    You need to adopt me so I stay at your house learning this. Man so good at this.

  • @viragvaghasiya2901
    @viragvaghasiya2901 2 ปีที่แล้ว +1

    Hey Joshua , can you please do a video on styling the custom Guntenberg block ?

    • @jimlanpheer5281
      @jimlanpheer5281 ปีที่แล้ว

      YES! He talked about doing that in the "next vid" and.... (much to my disappointment) it looks like he hasn't made it yet.

  • @НикитаТарасиков
    @НикитаТарасиков ปีที่แล้ว +1

    Thanks? Your cool developer!

  • @PatrickMeppe
    @PatrickMeppe 9 หลายเดือนก่อน

    Great tutorial.

  • @thisweblabvideos
    @thisweblabvideos 2 ปีที่แล้ว +5

    Hello Joshua. Thanks for this video. It is by far the most approachable intro into blocks for non react devs. I hate setting up the environments such as the one needed for compiling react and that has been my biggest obstacle into creating blocks.
    Regarding ideas for a future video!
    Different kinds of fields, and especially innerblocks inclusion, so that one add blocks within the one we are building. Block templates then to limit what can be added etc.
    This is extremely simple to do with ACF but it is also a kind of thing that seems should be done without ACF as it does not rely on fields.
    Thanks.

  • @kedarnathkare9067
    @kedarnathkare9067 ปีที่แล้ว

    Hey, this is an awesome tutorial and was very helpful. Is there any continuation for this video, you mentioned regarding the CSS part like in the next video?

  • @johnpearcey
    @johnpearcey 2 ปีที่แล้ว +1

    What version of WP did you use for this tutorial. I cannot get the plugin to do anything apart from appear in the plugin list. I am using version 6.0.2.

    • @jherbison
      @jherbison  2 ปีที่แล้ว

      Not sure.. It shouldn't matter, it still works on 6.0.2 on my end.. May be doing something wrong..

    • @jimlanpheer5281
      @jimlanpheer5281 ปีที่แล้ว

      The WP version should not matter....

  • @martinkaspar5095
    @martinkaspar5095 2 ปีที่แล้ว

    dear Joshua: Many thanks for this userful video. Its great 👑💓🕊!
    Very good - keep up your awesome work 🌟👑 plz do more such great videos - especially for the new version of WordPress - the 6.1 that is arriving next month!!
    Can't thank enough. ❤ 😊👍🏼 Much

  • @premiumeule1830
    @premiumeule1830 2 ปีที่แล้ว

    Awesome Tutorial Joshua, thank you very much for this. Your explanation style is very clear and helpful. Can‘t wait to see more of your Gutenberg tutorials. 👍

  • @tobbeeleeto
    @tobbeeleeto 8 หลายเดือนก่อน

    Great video, but where is the next video how to add classes to the elements and style them ?
    Whats the best way to do this that you show us in the video in 2024?

  • @cristianpintor2809
    @cristianpintor2809 ปีที่แล้ว +1

    I was able to register my plguin, but after I set up my JS file I am not able to see my block. Not sure what I am doing, anybody have a similar problem?

  • @PegoSama
    @PegoSama 4 หลายเดือนก่อน

    Wait! Is it necessary to insert the block again every time I want to change a single detail in the front-end? Isn't a hard refresh and save in the backend enough to update the front end?
    It is impracticable in the long term, especially if it is a block that needs to be reused in many places.

  • @random11
    @random11 10 หลายเดือนก่อน

    I want to create a block that accepts 1 attribute, lets say a city, then when its saved and displayed runs PHP code to generate the HTML (for arguments sake lets say the PHP code is going to call a web service and get weather data. Do you have a tutorial that covers how to set up a block that can do that?

  • @nic7708
    @nic7708 ปีที่แล้ว

    Thanks Joshua. You are a very good teller 👍💥
    Please make a video about adding and output post meta for posts.

  • @Dyl4n2010
    @Dyl4n2010 2 ปีที่แล้ว +3

    Great tutorial as always!! I have 2 quick questions,
    1. If I'm taking a date and a time as inputs what would be the attribute type be for those? (creating a countdown timer widget)
    2. Starting at timestamp 30:42, could you talk about how to make it into one function in the next video?

  • @TristanBailey
    @TristanBailey 2 ปีที่แล้ว

    Helpful. That’s. Is there a way for getting the block to update later if you made changes?

  • @kirtyrov2636
    @kirtyrov2636 2 ปีที่แล้ว +2

    Thank's for tutorial! I want to learn how can I do mini-classifieds add, from zero with unique plugin and theme development wordpress!

    • @jherbison
      @jherbison  2 ปีที่แล้ว

      Have you started on it? Thank you for watching and commenting.

    • @kirtyrov2636
      @kirtyrov2636 2 ปีที่แล้ว

      @@jherbison Hi, no I can't start. I don't know how architect it, from what things started. I want to learn how I can do this from zero

  • @kennedyfreitas7548
    @kennedyfreitas7548 2 ปีที่แล้ว +3

    Hi Joshua, this was actually a great tutorial and helped grasp the concepts of gutenberg. My only question is, why didn't you use jsx?

    • @jasonetaylor
      @jasonetaylor 2 ปีที่แล้ว

      I was going to ask if you can just use jsx instead

  • @ondrejbudicek5587
    @ondrejbudicek5587 2 ปีที่แล้ว +1

    Great video, please do popup button with text block

  • @Whatreally123
    @Whatreally123 3 หลายเดือนก่อน

    Hi Joshua,
    I am not a developer. I want to make a custom block based on existing gutenberg blocks. How can I use the code of existing blocks (available on github) and make some minor changes and turn it into an installable block? Or can i just duplicate the folder structure on my WP installaton and change relevant function names etc and will it work?

  • @MontanaShedCenter
    @MontanaShedCenter 2 ปีที่แล้ว +1

    I tried to follow this and I see the plugin but there is no widget. I went through everything several times and nothing works. I cannot see any errors being thrown in the console. How do you troubleshoot this?

  • @alifallahrn
    @alifallahrn 2 ปีที่แล้ว

    Hey! that's great! but, where is the next video? 🤔we are anxiously awaiting!

  • @DarshilThakor-v6s
    @DarshilThakor-v6s ปีที่แล้ว +1

    what is the benefit of add this JS in header ?

  • @commonindianman2442
    @commonindianman2442 2 ปีที่แล้ว

    Waiting for the styling part on the editor end, please publish that video as well.

  • @BaltoMovie
    @BaltoMovie ปีที่แล้ว

    Wow, that babel output is so readable.

  • @philipbunce95
    @philipbunce95 ปีที่แล้ว +1

    Great tutorial! So much easier to understand than the official WP docs. Could you please show how to show a block that uses an image from the media library. I would like to eventually create a Cover block that uses art direction to select different photos depending on screen width. I know how to do this with HTML but I want to be able to do this in WP. Thanks.

  • @aogunnaike
    @aogunnaike 2 ปีที่แล้ว +1

    Thanks for this.. 👍

    • @jherbison
      @jherbison  2 ปีที่แล้ว

      Thank you for watching and commenting.. Hopefully TH-cam will process the full HD version soon.

  • @davidreid2196
    @davidreid2196 2 ปีที่แล้ว

    Do you have any tutorials on how to create an announcement banner plugin that sits on top of the website?

  • @kippenvogelchen9717
    @kippenvogelchen9717 2 ปีที่แล้ว

    Nice Tutorial, but what is the advantage of using React here? thx

  • @gutemberguemascarenhas7890
    @gutemberguemascarenhas7890 2 ปีที่แล้ว

    Thanks for this tutorial

  • @MukeshKumar-vh4vp
    @MukeshKumar-vh4vp 2 ปีที่แล้ว +1

    it's awesome for me as beginner. A lot of thanks! Can you let me know what's are the benefits of joining your monthly membership.

    • @jherbison
      @jherbison  2 ปีที่แล้ว +3

      Thank you for watching and commenting.. I respond quicker to members, members also go free access to download the "show files" as I call them. Some "show files" will be free anyway, but some are not. I only did that to get everyone to follow the video and learn how to do it instead of just downloading the file and then trying to figure it out. I will also soon be releasing member only videos with no ads and more detail. Last but not least, being a member also helps me create more videos and hopefully make this a full time gig.. I have been a developer for 34 years and have a lot of knowledge not only in development (almost any language) but also business knowledge on how to be a successful freelancer. Been doing it for a really long time!!

    • @MukeshKumar-vh4vp
      @MukeshKumar-vh4vp 2 ปีที่แล้ว

      @@jherbison thank you sir for promptly replying me. Yes i do learn a lot from your channel day by day. I just started doing working on wordpress website development during covid time when i had lost my source of living with no prior knowledge of working with computer technologies. Even six years back i didn't have any knowledge of what an OS do in computers, why it is there? But these questions just made me curious to know more about how computers, web/mobile applications work. i was struggling with even updating content in websites then i just followed your videos and got the idea of even doing some of coding not only content updating. I am looking for getting into kind of freelancing since i haven't got any job in a company till this time since when it comes to my tech education, i am from non-technical background. Secondly, my age which is as of now is around 44yrs and i started just working in wordpress two years back doesn't fit to companies' criteria so i got not selected. For now, the people who are already doing freelancing i work with them for a little money. I'll join your membership.

  • @commonindianman2442
    @commonindianman2442 2 ปีที่แล้ว

    Please create one more tutorial related to the repeater field. If I need to add multiple anchor etc

  • @marcokielenschede
    @marcokielenschede 2 ปีที่แล้ว

    Hi Joshua, thanks for another great tutorial. I have a question, don't we need to sanitize the the input values?

  • @adavidmezei
    @adavidmezei ปีที่แล้ว +1

    Doomsday is coming for wordpress. I am a back end developer and I don't want to touch unreliable front-end technologies. Can I do this with PHP only?

    • @jherbison
      @jherbison  ปีที่แล้ว +1

      Unfortunately not. It is one of the biggest mistakes WordPress has made.

  • @mahmoudsamyessawy
    @mahmoudsamyessawy 10 หลายเดือนก่อน

    Thanks :)

  • @TamasMoroz
    @TamasMoroz 2 ปีที่แล้ว

    Great tutorial. Thank you! Any chance you could do a short video of how to customize the admin panel for the blocks? Custom icon, visuals etc. Maybe hide unnecessary default Wordpress block and just keep the custom ones, it could probably be helpful for some people, including me :)

  • @ayesayrelax3136
    @ayesayrelax3136 2 ปีที่แล้ว

    I Wonder if someone can explain how to add download button for pdf in custom block.

  • @creativeexpress18
    @creativeexpress18 2 ปีที่แล้ว

    It doesn't show up in the Block library once coded.

    • @jimlanpheer5281
      @jimlanpheer5281 ปีที่แล้ว

      Happened to me too, it means there's an error in your js file somewhere.

  • @robeeeeen
    @robeeeeen 2 ปีที่แล้ว

    A gutenberg block which will display a dropdown list with autocomplete from an external api. This api should work as middleware. If you make a video for us!!!❤❤❤❤

  • @ozoshmaharjan2016
    @ozoshmaharjan2016 2 ปีที่แล้ว

    Teach us how to add image option in the menu (apperance>menus) by coding please :> thanks in advance

  • @alitayefi192
    @alitayefi192 2 ปีที่แล้ว

    hi
    thanks for video but file link are not working

  • @andreysivak6404
    @andreysivak6404 2 ปีที่แล้ว

    Thank a lot!

  • @johnstorm589
    @johnstorm589 ปีที่แล้ว

    Great content! It is a shame that this is a very slow development flow

  • @EgorDemeshko
    @EgorDemeshko ปีที่แล้ว

    wordpress docs hard to understand. i'm reading them for 4th day, it hard to tell where smth goes and what it does. ))

    • @EgorDemeshko
      @EgorDemeshko ปีที่แล้ว

      in docs they describe edit function as it used for handle appearance in editor, while save is what it will be in frontend of site. but somewhere also mention that save function save shouldn't change anything. so it was very annoining question, how i can build actually reactive plugin that can work with, database for example. i looked code for custom elements, not to say they overwhelming me with defferent code, as i understood nevertheless all plugin logic decribed in edit function, and save function return null almoust all the time. it's very confusing and annoying) ok. keep watching.

  • @a99986
    @a99986 ปีที่แล้ว

    is must need to same folder structre like you

  • @1mr4n4li
    @1mr4n4li 2 ปีที่แล้ว +2

    why poor video quality? i see 360p

    • @jherbison
      @jherbison  2 ปีที่แล้ว +1

      TH-cam is taking their time at processing the HD quality of the video!

    • @jherbison
      @jherbison  2 ปีที่แล้ว +1

      I am a smaller channel so they take their time processing my videos. They say they don't and that it is a first come first serve but that isn't true. I have a friend that has a really large channel. I posted a video and then he posted one 20 minutes later. His was processed almost immediately and mine took 2 hours.

    • @1mr4n4li
      @1mr4n4li 2 ปีที่แล้ว +2

      @@jherbison i think you should publish your video when its fully converted because we need to read your coding which is not possible in lower resolution. anyway you are going great. you are going to be big. thumbs up

    • @jherbison
      @jherbison  2 ปีที่แล้ว +1

      @@1mr4n4li Thank you.. It is funny, if I wait until it is done publishing, youtube takes even longer. I waited 42 hours one time before it was completed. They say if it takes more than 48 hours, you should remove it and re-upload it.

    • @1mr4n4li
      @1mr4n4li 2 ปีที่แล้ว +1

      @@jherbison no problem you are doing good

  • @Realswagoverlord
    @Realswagoverlord ปีที่แล้ว +1

    Pleaes give source code

    • @jherbison
      @jherbison  ปีที่แล้ว +1

      I will get that fixed today.. Sorry about that. Our redirect to the files aren't working for some reason. Moved the server and probably broke something. Thank you for letting me know.

    • @jherbison
      @jherbison  ปีที่แล้ว +1

      It was a caching issue. It is fixed now and the link should be working.

    • @soloman981
      @soloman981 ปีที่แล้ว

      i doesnt work anymore again :D
      @@jherbison

  • @MrZerosixZeroone
    @MrZerosixZeroone 2 ปีที่แล้ว

    This is soo wrong on so many levels

    • @jherbison
      @jherbison  2 ปีที่แล้ว +3

      Yeah? Please explain! You can’t just say it is wrong without saying why! Did you make a video that shows how to do it right?

  • @isuke01
    @isuke01 2 ปีที่แล้ว +4

    Why not use npx @wordpress/create-block?

    • @johnpearcey
      @johnpearcey 2 ปีที่แล้ว +1

      Because it teaches us nothing.

    • @jimlanpheer5281
      @jimlanpheer5281 ปีที่แล้ว +1

      That works, but this is a TUTORIAL man!