Simple WordPress Plugin Development - Start to Finish

Поделиться
HTML-код
  • Опубликовано: 19 окт 2024

Комментарии • 140

  • @segunolamide1989
    @segunolamide1989 2 года назад +14

    Thanks man. There are different things to learn from this video. You have helped a soul. Composer usage in the plugin/ folder architecture and understanding how to use a library. 👏 I love it.

    • @mrdigitalau
      @mrdigitalau  2 года назад +1

      Awesome, glad to have helped you mate. Take care

  • @mpgilbertusa
    @mpgilbertusa 2 года назад +8

    Thanks for covering the Carbon Fields inclusion. I have been looking for a way to do something like that recently. Great stuff.

    • @mrdigitalau
      @mrdigitalau  2 года назад

      You are very welcome Michael

  • @silentphil77
    @silentphil77 2 года назад +6

    The man is back! Thank you for this!

  • @paulthornton1302
    @paulthornton1302 Год назад +3

    This is an excellent and very informative tutorial. It has provided me with a much better understanding of how to create a plugin. Thank you for your time and effort!

  • @sabinmagar4152
    @sabinmagar4152 2 года назад +2

    Waiting for your tutorials. Finally, you uploaded.. Thanks

    • @mrdigitalau
      @mrdigitalau  2 года назад

      You're welcome, hope you like it!

  • @techjavaid6177
    @techjavaid6177 2 года назад +2

    You're a legend...have been following you from long time... Good to see new content...hope we'll see more of this type.

    • @mrdigitalau
      @mrdigitalau  2 года назад

      Cheers mate :) Will try to be be posting content more regularly!

  • @srdjan02
    @srdjan02 Год назад

    I don't know why there are so little likes... you are the MASTER... tnx so much

  • @huynhminhquan9977
    @huynhminhquan9977 Год назад +1

    Easy to understand, explain every case. You're the best. Hope you doing well. Keep it up, my man

  • @volodymyrselevertov
    @volodymyrselevertov 2 года назад +1

    No way, you are back 🎉glad to see you Sean

    • @mrdigitalau
      @mrdigitalau  2 года назад

      Hey Volodymyr, it's been a while hey. Hope you're doing well and staying safe over there mate.

  • @DR9Freelancer
    @DR9Freelancer 2 месяца назад

    Great tutorial!!! One of the best i have seen so far! Thank you for sharing your knowledge with all of us...

  • @olgademina6414
    @olgademina6414 5 месяцев назад

    Thank you so much for this tutorial. I learned a lot about wordpress plugin creation fallowing you! You did such an important job.

  • @WPCookie
    @WPCookie 2 года назад +6

    Thank you for the tutorial, but I wish you would follow the first rule of creating tutorial videos, which is to use a large font in your editor! 🔍

    • @mrdigitalau
      @mrdigitalau  2 года назад +4

      Sorry about that, I only realised after my marathon video :/ It's been a while..haha

  • @andrewrobinson2040
    @andrewrobinson2040 Год назад

    Amazing tutorial, you covered so much ground and I like the fact that you worked through the bugs too. Hope you got some sleep after that all nighter!

  • @johnpdev
    @johnpdev 4 месяца назад

    Absolute gem mate! I appreciate your effort to make this awesome video!

  • @akashnegi4497
    @akashnegi4497 3 месяца назад

    Thank you for putting out this awesome tutorial!
    Truly appreciated 🙏🙏

  • @deogenesabejuelajr6701
    @deogenesabejuelajr6701 8 месяцев назад

    Learned a lot form this tutorial. Thank you so much!!!!

  • @RyanScottForReal
    @RyanScottForReal Год назад +1

    I don't get how having to install Carbon Fields lets you create a package that can be shipped. Doesn't it need to be installed wherever you put the plugin? When I simply installed the plugin in my wordpress, it failed because of the lack of the vendor folder/carbon fields.

  • @brianjuliusllevado2553
    @brianjuliusllevado2553 Год назад

    Thank you, I know now how to make a custom contact plugin.

  • @Shon3GEES
    @Shon3GEES Год назад

    Thank you thank you. Good to see a complete tutorial. Simple but yet functional. :) Good job!

  • @premnathd
    @premnathd 2 года назад

    Welcome back. Missed your videos

  • @Jaapgoorhuis
    @Jaapgoorhuis 4 месяца назад

    Thanks! Very good tutorial. Learned a lot!

  • @jayfungster2195
    @jayfungster2195 Год назад +3

    Thank you, Mr. Digital. I am new at this. This tutorial is excellent and I am encouraged to learn and implement it. I followed the steps in the video very closely but I could not get past the ajax section (45 min marker) because I kept getting "Uncaught ReferenceError: jQuery is not defined"? Any idea how/where I can properly define jQuery.

    • @MassinissaMouhoub-eg9pq
      @MassinissaMouhoub-eg9pq 11 месяцев назад +1

      I got the same error :(

    • @bernanribeiro3329
      @bernanribeiro3329 11 месяцев назад

      @@MassinissaMouhoub-eg9pq , HI, I had to enqueue the jquery library. Also to make the javascript code work i had to wrap this into a setTimeout, like: setTimeout(() => {
      jQuery(document).ready(function ($) {

      });
      }).
      I am not sure if this is the best way but I didn't find any other solution.

    • @sidharth3881
      @sidharth3881 9 месяцев назад

      ​@@bernanribeiro3329can you please tell me how to enqueue the jquery library

    • @johnloydlao8573
      @johnloydlao8573 7 месяцев назад +1

      for those having error "Uncaught ReferenceError: jQuery is not defined", just add ob_start and ob_get_clean on show_contact_form function.
      Code will look like this:
      function show_contact_form()
      {
      ob_start();
      include MY_PLUGIN_PATH . '/includes/templates/contact-form.php';
      return ob_get_clean();
      }

  • @vpraneeth554
    @vpraneeth554 2 года назад

    Wow, you are back, thanks for the tutorial

  • @kensleylewis
    @kensleylewis 2 месяца назад

    Unless I'm mistaken, the purpose of the __construct is to pass initial parameter values back into the class. If that is true, why use the __construct to manage the plugin path for auto-loading classes?

  • @WonderRob
    @WonderRob 2 года назад +2

    This is great! More similar tutorials like this will be amazing, few ideas:
    Using ACF
    Interacting with external API
    Using react on FP & CSS Library (Tailwind?)

    • @mrdigitalau
      @mrdigitalau  Год назад

      Hey Rob Thanks for your suggestions
      Reckon you could give me an example of an external API to work with? I will do this in my next video
      Cheers

    • @WonderRob
      @WonderRob Год назад

      @@mrdigitalau Hi, maybe something like Pixabay (using cURL for the example would be much appreciated)?

  • @RyuuuGamingUnlimited
    @RyuuuGamingUnlimited Год назад +2

    Hi! Your contents are awesome! You teach very clearly, I came from the last plugin dev series you've done, and I would say I learned a lot from that.
    If you're familiar with javascript frameworks, such as svelte, do you have a setup to use it to develop a Wordpress plugin? It would be a great series! Any frontend framework will doo

  • @chivakhoeun1262
    @chivakhoeun1262 2 года назад

    Thanks for the new video, Mr. Digital,

    • @mrdigitalau
      @mrdigitalau  2 года назад +1

      You're welcome Chiva! Cheers

  • @josephs.8474
    @josephs.8474 Год назад

    Thanks Mr Digital for the content! This is really helpful. Hope you'll make much more :))

  • @RichardLevy-z3j
    @RichardLevy-z3j 6 месяцев назад

    This is great... I do have 1 issue: register_rest_route callback is not working; I had a permission_callback error so i added __return_true. Getting a 404 in the return header. Any idea what I am doing wrong? Looking forward to continuing the lesson.

  • @JamshaidAliPak
    @JamshaidAliPak 8 месяцев назад

    Sean, that is an amazing tutorial.

  • @Dogacagrtc
    @Dogacagrtc 4 месяца назад

    I wonder why u used Carbon Field instead ACF? You have many videos on ACF, since this is the latest video, I was wondering if you find carbon field more useful overall?

  • @huycuongnguyen7965
    @huycuongnguyen7965 2 года назад

    Glad you're back.

  • @ragingvids1693
    @ragingvids1693 2 года назад +1

    He's back!!!!

  • @darcemac
    @darcemac 2 года назад +2

    Awesome, what a great tutorial.

    • @mrdigitalau
      @mrdigitalau  2 года назад

      Thanks very much mate, really appreciate it

  • @Michael-yo3vu
    @Michael-yo3vu 2 года назад +1

    You're back! 👀

  • @genie7941
    @genie7941 Год назад

    Thank you. Great lecture. That was super super helpful to me.

  • @ElenaPoliti
    @ElenaPoliti 7 месяцев назад

    Great video. I am trying to include a Dropbox authorization as well. Could it be interesting if you create a video explanation for that too!

  • @johanneskingma
    @johanneskingma 5 месяцев назад

    2:12:01 why not replace the $param[] fields with sanitzed versions?

  • @kannietanders2653
    @kannietanders2653 Год назад +1

    for some reason is my form not working with the script. whenever i submit form it just goes to some blank page. but it doesnt respond with the javascript with jQuery. no errors in vs and no errors in wp or in the console. i dont know why this is happening. at 45:30

    • @sidharth3881
      @sidharth3881 9 месяцев назад

      Facing the same issue, any updates?

    • @johnloydlao8573
      @johnloydlao8573 7 месяцев назад +1

      for those having error "Uncaught ReferenceError: jQuery is not defined", just add ob_start and ob_get_clean on show_contact_form function.
      Code will look like this:
      function show_contact_form()
      {
      ob_start();
      include MY_PLUGIN_PATH . '/includes/templates/contact-form.php';
      return ob_get_clean();
      }

  • @trongnhanle7658
    @trongnhanle7658 Год назад

    Why function get_params() doesn't work. It show array with length == 0. Can you give me some solutions, please ?

  • @johanneskingma
    @johanneskingma 5 месяцев назад

    45:00 shoudl be using es6 modules and (fetch) Promises these days. (and ignore jquery) And what was wrong with (instead of )?

  • @phildavies6333
    @phildavies6333 2 месяца назад

    Great Tutorial. Where do i find the basic theme?

  • @happydev512
    @happydev512 Год назад

    Hey, long time no see, welcome back

    • @mrdigitalau
      @mrdigitalau  Год назад

      Gday Loc, Thanks mate!!! All the best to you

  • @purrrito
    @purrrito Год назад

    Hi. First of all, thank you for this. I am following this tutorial, installed Laragon. Everything was going smoothly but all of the sudden wordpress is not picking up the code from the folder?
    The front page is all blank and when i look at the source there's nothing. But my code still intact, no changes in the folder D:

  • @__byteWise01
    @__byteWise01 Год назад

    Thank you for this tutorial. If I call the shortcode with php I display its content, but from the wordpress editor I don't see anything. Some advice?

  • @Sh-1933
    @Sh-1933 Год назад

    Hi, I added the form with the shortcode. but there is an error saying form not active.

  • @RobsonBanda-iz4qh
    @RobsonBanda-iz4qh Год назад

    hi the css file isn't working. Are there any alterations on that?

  • @DeepakPrajapati-cr4sf
    @DeepakPrajapati-cr4sf Год назад

    can you tell the extenstion which you are using for wordpress developement

  • @visakhkumarts
    @visakhkumarts Год назад

    thanks, man. this really helped full.

  • @purrkachuu
    @purrkachuu 2 месяца назад

    wow, the moment i see die(you cannot be here). i know this guy is good. thx a lot for the video

  • @vishnunarayanan9829
    @vishnunarayanan9829 3 месяца назад

    Plugin could not be activated because it triggered a fatal error.
    @ 14:00

  • @eliluong
    @eliluong Год назад

    Should I watch this newer video or the "Let's Build a WordPress Plugin From Scratch" series from 2021?

  • @sobiamaan2938
    @sobiamaan2938 2 месяца назад

    everything is good, but my jquery is not loading. Due to which I am not able to do learn further.
    Can someone help ?

  • @sania09able
    @sania09able 9 месяцев назад

    Composer is just a package manager for PHP, keeps track of all the different php packages, their versions, updates etc

  • @ismaeelyaghoubi860
    @ismaeelyaghoubi860 Год назад

    Thanks for the video. Just a quick question. Do you know how to have the form on every page without using the shortcode?

    • @ShubhamSharma-ix8nw
      @ShubhamSharma-ix8nw 9 месяцев назад

      You can think of creating some custom action hooks.

  • @MuhammadNoor-k1v
    @MuhammadNoor-k1v 9 месяцев назад

    Thanks, man for this useful tutorial. When I activate the plugin I get a fatal error. I downloaded the zip file from your Github.

  • @gregorhaase5442
    @gregorhaase5442 Год назад

    Hey, thanks for the tutorial, my plugin is working so far. But I struggle with updating an existing submission. everything I tried always created a new submission instead of updating the old one - or it does not change save anything at all because I can't seem to get the correct post ID for the existing submission. Any idea?

    • @gregorhaase5442
      @gregorhaase5442 Год назад

      Nevermind, I made it work. The title of a 'submission' is a unique userID.
      So I grab the existing post by using get_page_by_title that returns an object. This holds the correct post ID ('$postByTitle->ID'). Here's the snippet that works for me:
      $postByTitle = get_page_by_title( $params['userID'], 'OBJECT', 'submission');
      foreach ($params as $label => $value) {
      update_post_meta ( $postByTitle->ID, $label, $value);
      }

  • @wpglob-wordpresstutorials
    @wpglob-wordpresstutorials Год назад

    Amazing job! Well done!

  • @aogunnaike
    @aogunnaike 2 года назад +1

    Thanks for this, Can you also work on Gutenberg block on how to create custom blocks? Thanks

    • @mrdigitalau
      @mrdigitalau  2 года назад +2

      Hi, Yes, I will do a new video specifically for this!

    • @aogunnaike
      @aogunnaike 2 года назад

      @@mrdigitalau awesome 😎

  • @Arik-IT
    @Arik-IT Год назад

    Brother, I would like to display plugin update notice on the admin panel.. please make a video for this... Thank you so much...

  • @MassinissaMouhoub-eg9pq
    @MassinissaMouhoub-eg9pq 11 месяцев назад

    When I added the jQuery instruction, I got problems saying jQuery isn't not defined.
    PS: I'm developing on local host and I'm new to wordpress

  • @genofelice6034
    @genofelice6034 8 месяцев назад

    Hello: I created your sample plugin. When I try to install I get Unpacking the package…
    Installing the plugin…
    The package could not be installed. No valid plugins were found.
    Plugin installation failed.
    This is the code:

    • @mediasites
      @mediasites 8 месяцев назад

      where you put your plugin, is it in correct place?

  • @atrionpedrodaia
    @atrionpedrodaia Год назад

    damn this was perfect man, thank you!

  • @STUDYSHOOT
    @STUDYSHOOT 2 года назад

    Welcome back

  • @bernanribeiro3329
    @bernanribeiro3329 11 месяцев назад

    To run the jquery I had to enqueue it, also I had to wrap the code into a seTimeout. is it because the new wordpress version?

    • @sidharth3881
      @sidharth3881 9 месяцев назад

      Can you tell me how you did it.? The code

    • @bernanribeiro3329
      @bernanribeiro3329 9 месяцев назад

      @@sidharth3881
      add_action('wp_enqueue_scripts', 'enqueue_jquery');
      function enqueue_jquery() {
      wp_enqueue_script('jquery');
      }
      setTimeout(() => {
      jQuery(document).ready(function ($) {
      $("#enquiry_form").on("submit", (e) => {

      e.preventDefault()
      const form = $("#enquiry_form")
      $.ajax({
      type: "POST",
      url: "",
      data: form.serialize(),
      })
      })
      });
      }, 50)
      Please, let me know if it worked.

  • @ivanyosifov2629
    @ivanyosifov2629 Год назад

    Please, please for future tutorial increase the font size. Thank you

  • @rasydev
    @rasydev 2 года назад +1

    Super love ❤❤❤

    • @mrdigitalau
      @mrdigitalau  2 года назад

      Thank you, hope you like it!!

  • @WonderRob
    @WonderRob Год назад

    Hey, I'm having some issues with verifying the nonce - it seems that it only verifies when I'm logged off, when I'm logged in it's not getting verified - Any ideas?

    • @mrdigitalau
      @mrdigitalau  Год назад

      Hey Rob. What happens when you are logged in? Does it just fail to send the email?

    • @WonderRob
      @WonderRob Год назад

      @@mrdigitalau Yes, it's just gives me the error message I've added when wp_verify_nonce function fails... When I'm logged out - it submits ok, wp_verify_nonce succeeds.

  • @karansingh-jx8nc
    @karansingh-jx8nc 2 года назад +1

    Thankyou Sir...

  • @carinarivera972
    @carinarivera972 2 года назад

    How do i make the form appear any where on the page like within a div i place it in? when i add the shortcode in it always shows at the top of the page

    • @mrdigitalau
      @mrdigitalau  2 года назад +1

      Hi Carina, go to your contact-form.php file and edit the "show_contact_form" function, can you change it to this and let me know if it works?
      function show_contact_form()
      {
      ob_start();
      include MY_PLUGIN_PATH . '/includes/templates/contact-form.php';
      return ob_get_clean();
      }

    • @carinarivera972
      @carinarivera972 2 года назад

      @@mrdigitalau yes that worked perfectly, you are the man!

  • @mdashrafuddin2825
    @mdashrafuddin2825 Год назад

    Nice tutorial but you video resolution must should be 1080p

  • @AmninderDazonn
    @AmninderDazonn Год назад

    Thank u sir🙂

  • @RyanScottForReal
    @RyanScottForReal Год назад

    The shortcode causes the page its inserted into to not be able to update with invalid json response. :(

    • @Sh-1933
      @Sh-1933 Год назад

      it gives me the same error. did you solve the error?

  • @darumaleo
    @darumaleo 6 месяцев назад

    very useful thx

  • @jackepner9984
    @jackepner9984 9 месяцев назад

    You're doing this in a WP folder.... you can't develop a plugin outside of a live WP project?

    • @januariswambua3529
      @januariswambua3529 7 месяцев назад

      You can. Then zip the file. on the "Add new plugin" option in wordpress admin click on the "upload" option and then upload your zipped plugin file.

  • @szymonbytniewski2988
    @szymonbytniewski2988 Год назад +1

    Would you like to make Woocommerce plugin & theme development tutorial?

  • @HasinthaWeragala
    @HasinthaWeragala Год назад

    thanks mate. G'Day

  • @mohamedyoussef8835
    @mohamedyoussef8835 Год назад

    Awesome videos ++++++++++++ 🙂

  • @OLM46
    @OLM46 Год назад

    Thank you so much for this tutorial. Could you please make a video where you integrate recaptcha?

  • @dejandejanovic472
    @dejandejanovic472 Год назад

    Can you please record more video's please.. mate your are my teacher.. more thrn school or courses

  • @maomorin
    @maomorin 9 месяцев назад

    somehow in my case JQuery wasn't working as in the video. So let me share what I did to fix it. (And... quite funny that in 2023 we are still using jQuery lol)
    symbol $ was generating some conflict so the first thing is add a "$ = jQuery.noConflict()" in the very first line of the form script. Then, you shall set "const form = $("#enquiry_form")" and work with the variable form all the time, it's possible that "$(this)" won't grab the form itself but the document. It happened to me because I was using arrow functions in stead of anonym function as in the video. And last, since the ajax action wasn't sending any data, PHP was thouing an error "_nonce key is not in array", so it may be a good idea to check first if the key is in the $params, and if is not, send a proper error warning, and not let PHP to send a debug error message.

    • @sidharth3881
      @sidharth3881 9 месяцев назад

      Can you please help me? I also faced the same error. How do i enqueue the jquery.

    • @maomorin
      @maomorin 9 месяцев назад

      @@sidharth3881 oh, jQuery is already there, Wordpress include it by default

  • @nadersada8453
    @nadersada8453 7 месяцев назад

    ❤❤❤❤

  • @hefalump56
    @hefalump56 Год назад

    Unfortunately, after watching this video after your five wordpress plugin from scratch series, as a beginner trying to learn developing plugins, this definitely wasn't simple. I got a lot from the security side of protecting the plugins. What happened to Part 6 and the end of the plugin from scratch? That was far easier to follow, probably as is was broken up a little more.

  • @johanneskingma
    @johanneskingma 5 месяцев назад

    25:00 use \CarbonFields{CarbonFields,Field,Container];

  • @amlayla
    @amlayla Год назад

    Great video, given you a sub and like ! Please make a another video on converting html website to Wordpress theme. Please let your html website have Author and authors page, tags page with each tag and its own post under, signup and signin page, membership page, comment section, single page, eror 404 page, archive page and more. Precisely for a blog. Waiting for my video request. Thank you in advance🙈

  • @not_amanullah
    @not_amanullah 3 месяца назад

    make course on theme development

    • @milosh996
      @milosh996 3 месяца назад

      it's 4 years old but I think it's still relevant
      ruclips.net/p/PLgFB6lmeXFOpHnNmQ4fdIYA5X_9XhjJ9d

  • @user-l9v7xff567
    @user-l9v7xff567 Год назад

    The screen is too small to see well and the speech is too fast to understand.

  • @not_amanullah
    @not_amanullah 3 месяца назад

    zoom in can't see clearly

  • @michaelperlbach3438
    @michaelperlbach3438 5 месяцев назад

    This ain't simple and maintainable at all as it requires carbon fields which is a rather complicated solution.
    Apart from that I wonder how an add-on using Composer can easily be shipped and installed into another WordPress.

    • @kakosnaki
      @kakosnaki 2 месяца назад

      Carbon is installed as a plugin dependency, not as a WP theme dependency or separate WP plugin

    • @michaelperlbach3438
      @michaelperlbach3438 2 месяца назад

      @@kakosnaki Does this in any way weaken my objections?

    • @kakosnaki
      @kakosnaki 2 месяца назад

      ​@@michaelperlbach3438I agree that CF is not the easiest to use, the docs are hit-and-miss. The whole plugin vs library thing is confusing. Even the video is wrong, only carbon-fields needs to be installed the other is just a useless wrapper for it.
      I thought you meant that CF needs to be installed as WP plugin using Composer and that makes migrations difficult. But migration are easy as CF comes bundled into the plugin. I have had no issues with Composer.

    • @michaelperlbach3438
      @michaelperlbach3438 2 месяца назад

      @@kakosnaki You might have no problems with composer because you presumably have composer on your server and you have access to a shell. For hosting environments that do not provide for that this whole solution is useless.

  • @TACDetective
    @TACDetective 8 месяцев назад +1

    Ssadly, the man has gone again so no point in subscribing 😞

  • @johnloydlao8573
    @johnloydlao8573 7 месяцев назад +1

    for those having error "Uncaught ReferenceError: jQuery is not defined", just add ob_start and ob_get_clean on show_contact_form function.
    Code will look like this:
    function show_contact_form()
    {
    ob_start();
    include MY_PLUGIN_PATH . '/includes/templates/contact-form.php';
    return ob_get_clean();
    }
    and also add this on contact-form.php under includes directory
    add_action('wp_enqueue_scripts', 'enqueue_scripts');
    function enqueue_scripts()
    {
    wp_enqueue_script('jquery');
    }

  • @johanneskingma
    @johanneskingma 5 месяцев назад

    1:52:56 what about echo get_post_meta($post?id, $column, true):