Multiple WordPress Blocks In One Plugin (@wordpress/create-block)
Вставка
- Опубліковано 14 жов 2024
- Check out my full WordPress course here learnwebcode.t...
My Interactivity API Tutorial • WordPress Interactivit...
You may have noticed CSS isn't being applied to the 2nd and 3rd blocks. You just need to go into your "editor.scss" and "style.scss" files for each new block and change the ending part of their selector to match your newly duplicated block name instead of the original block name. For example, my 2nd block should use a selector like this: ".wp-block-bradsblocks-secondblock"
Follow me for updates on new videos or projects:
Instagram: / javaschiff
Twitter: / learnwebcode
Facebook: / brad-schiff-1542576316...
Twitch: / learnwebcode
Excellent content, seeing you go through these steps with /create-block is making me more confident in creating custom blocks without ACF Blocks.
I think I bought a tonne of tutorials from you , which I keep postpone watching them (I'm sure I'm not the only one :D) Do you recommend any videos/courses where you go into detailing your workflow in wordpress? I havent seen too many working in visual studio code for wordpress.
Good question! I'm pretty satisfied with VS Code; whenever you save in a PHP file it will warn you of any syntax errors using the PHP binary on your system to evaluate it. I'm always open to learning tips and tricks to improve my workflow, but as of today I'm not very knowledgable about more advanced PHP setups. I do want to get some sort of "auto refresh" system setup so that WordPress sites refresh every time I save a file, without using BrowserSync would be ideal.
Thank you for this excellent tutorial. How about a detailed course where you show us how to create your own fully customizable blocks from various design elements such as accordions or slideshows etc.? That would be awesome! 🤓
I like that idea. In my full course we do create a slideshow block and on the admin side you can add as many slides as you want to the block instance, upload a background photo for each slide, and add headlines / CTA buttons for each slide as well.
@@LearnWebCode All right, you meant your Wordpress course at Udemy. I discovered the new chapter “Keeping Blocks Organized with block.json & render.php”. Very nice 😎
awesome content , thax for sharing
perfect, to the point, thank you!
Truly good job, thank you! =D
Thanks for the video. Your videos are so helpful ❤
So nice! Thanks for sharing.
First comment should get like from Brad ❤❤
You know it! Thanks for the support!
Always best, Brad
Love the way you teach.❤
@@LearnWebCode thank you sir
God bless you for this 👍 you read my mind 😂
Great job, bro!
The render.php does not work for me :(
Wordpress 6.6.1 version
With Interactivity API is nosense to still learning React for a WordPress Dev enviroment? (I'm learning it right now, but it has sense or better to focus on interactiity only?)
Good question. The admin-editor side still uses React; so I definitely think it still makes sense to know React as a WP developer. And for features that don't need SSR for maximum accessibility / SEO you could still use React on the public-front end as well if you wanted instead of the Interactivity API.
@@LearnWebCode Damn so i have to study it ahahah, i prefer Vue for the frontend works because i like more the writing style, but i want to be very complete with the Wordpress Dev, and React is still an important part.
thank you
Спасибо!
what about package.json - main entry point?
thanks
I created a custom block by running the npx command and activated the plugin in the admin. However, I can't see my block in the gutenberg editor. What am I missing here?
Did you try an "npm run build" or "npm run start" after changing the block name? Is there an error message or is the block type just not showing up in the block search UI at all?
@@LearnWebCode I tried to run npm run start and npm run build afterwards to create a new build with a minor change. Everything runs fine, no error in any logs. It just doesn't show up in the UI list view
@@raviramcharan3812 & @LearnWebCode I am having the exact same issue. I'm glad I'm not the only one. I'm following the steps in the video. I get to the part of the video where I activate the plugin and that all shows up but then when I go to the helloworld post and search for the newly activates/created block it does not get listed and when I search it is also not there.
@@LearnWebCode same issue. I left my comment below.
same issue mine also not showing
thanks 😊 🫂 🙏