Using and Troubleshooting Alpine.js in WordPress Blocks

Поділитися
Вставка
  • Опубліковано 22 січ 2025

КОМЕНТАРІ • 11

  • @pepitogrande
    @pepitogrande Рік тому +1

    Great tutorial that should be useful even for more experienced users, keep up the good work :)

  • @sylviomurer7915
    @sylviomurer7915 Рік тому +1

    Hello Adam, I have a question which is not directly related to this topic. I am currently working with Pinegrow and Wordpressthemes through your course. So far I have created the pages with Bricks and AutomaticCSS. Now the question arises, do I continue working with Automatic CSS or is it better to create this setting myself?

    • @AdamLoweIO
      @AdamLoweIO  Рік тому +1

      That’s a tough question and there isn’t a right answer. If you like ACSS you can still use Pinegrow or Oxygen (and soon Gutenberg, I think).I thought I had a video showing how to use ACSS with Pinegrow, but looking back it seems that it’s a much older one that doesn’t really apply.
      I do have a small clip on another video that might be useful, showing you how to use other frameworks with Pinegrow. Start at 2:49.
      ua-cam.com/video/DaiFSZ6o5S4/v-deo.html
      I guess I should make a video explicitly about ACSS, huh?
      The decision about whether or not to use Bricks is totally up to you. I personally think it’s a fine platform, and it overcomes some of the frustrations inherent in the Gutenberg editor, but the more I use it the more I find it getting in my way.

    • @sylviomurer7915
      @sylviomurer7915 Рік тому +2

      @@AdamLoweIO Thank you very much. I think the same. Bricks I find not bad, but with each update always something happens with layout and I would like to finally become independent of all the page builder and parallel also really understand how wordpress works.

  • @briansteeleca
    @briansteeleca Рік тому +1

    Thanks for all the effort you put into this Adam, it's super helpful. I love these AlpineUI Components but never tried putting one in a block! It's good to know it can be done.
    That said, I found I was getting errors if I added two blocks that used the combined script technique, likely because alpine.js was being loaded twice. (I know you mentioned something about that in your video.) So rather than combining scripts, I've tried enqueueing alpine.js (globally), and then using the block script technique for components that require plugins. I was afraid it may not work because the plugins should be loaded first, but so far no errors.
    That brings me to another question: is it okay to load alpine.js "in footer"? The Alpine docs tell say install it in the head with "defer". I found a way to enqueue it in the head with "defer", but I'm not sure if that's necessary - putting it in the footer seems to work too.

    • @AdamLoweIO
      @AdamLoweIO  Рік тому +1

      Yeah, everything you wrote makes sense. I also put it in the footer most of the time unless I have a good reason not to.