Good discussion. Currently going through the process of evaluating native vs ACF blocks and this helps. Leaning to ACF, honestly, just to avoid a crazy build process and the janky nature of static block maintenance.
Stopping by from the audio on Pocket Casts! I really enjoyed this episode! Even though I'm not a developer, or get into the code too deep, I find it very helpful hearing your approaches. I'm just beginning to wrap my head around how it all fits together and how best to use custom blocks. Although I seldom use it, I am familiar with ACF and have used it on other sites. 🙂 I stopped by here to see the visual you were demonstrating, so thank you for having the UA-cam up as well. 🙌 Edit: I say not a developer because I'm pretty ignorant compared to most, and especially to both of you. But I am theming, currently using basic PHP for my block patterns, and adding template parts. So whatever that would make me, that's what I am. And I'm okay with whatever you call me as long as it's not late for dinner. 😅
Thank you for listening/watching. To be fair, I'm barely starting to understand the custom block and JavaScript stuff myself, so I think I'm learning just as much from recording these episodes as everyone else. -Brian
Nothing wrong with starting to learn! As a dev, you're always learning, no matter how experienced you are. I'd love to know more about the kinds of things you're working through and what hiccups you encounter as you get into dev more. :) Glad you enjoyed the episode! - Aurooba
Great vid! Is there a way of setting the default align value as well? I’d like to set the default align on some of my blocks to “full” instead of “none”
It's a great video with lots of insights. But I wonder how did you manage to display the two columnsin edit mode just like in preview mode? In my Block the input fields in edit mode are all linearized underneath another ...
So when setting up your Field Group, each field has a "width" option under the Presentation tab I believe. You can use percentages to get your field to show up in columns.
@@BrianCoords Thanks for your super-quick answer! :) Yes, that's a workaround, but I'm looking for a way, that the edit mode just uses and displays the values of my main stylesheet. Cause there everything is well defined ... like the columns and look of my block etc. Is the problem, that I don't use a block stylesheet? (I just want my main stylesheet to do all styling stuff for the moment ...)
@@carolinmoll5859 Technically any stylesheets that you're loading into the block editor _should_ show up on your ACF Block - is your main stylesheet loaded in the block editor?
@@BrianCoords I must admit, I don't know if it is correctly. I do have registered the stylesheed via the enqueue_block_editor_assets hook. Everything then looks good in preview mode. But if i switch to edit mode, I have only a list of fields without my column context ...
@@BrianCoords Now I know what might be the problem. It's not the stylesheet not beeing loaded ... In Edit mode we have completely different HTML-Block: It's an outer DIV with classes acf-block-fields acf-fields, then inner DIVs with class acf-field ... Any ideas how to put the acf-fields in "our" DIV structure, like we have defined it in our block-php-file?
Seriously underrated podcast
Good discussion. Currently going through the process of evaluating native vs ACF blocks and this helps. Leaning to ACF, honestly, just to avoid a crazy build process and the janky nature of static block maintenance.
Can I duplicate the folder strcture of a gutenerbg block and make some changes and will it work?
Stopping by from the audio on Pocket Casts! I really enjoyed this episode! Even though I'm not a developer, or get into the code too deep, I find it very helpful hearing your approaches.
I'm just beginning to wrap my head around how it all fits together and how best to use custom blocks. Although I seldom use it, I am familiar with ACF and have used it on other sites. 🙂
I stopped by here to see the visual you were demonstrating, so thank you for having the UA-cam up as well. 🙌
Edit: I say not a developer because I'm pretty ignorant compared to most, and especially to both of you. But I am theming, currently using basic PHP for my block patterns, and adding template parts. So whatever that would make me, that's what I am. And I'm okay with whatever you call me as long as it's not late for dinner. 😅
Thank you for listening/watching. To be fair, I'm barely starting to understand the custom block and JavaScript stuff myself, so I think I'm learning just as much from recording these episodes as everyone else. -Brian
Nothing wrong with starting to learn! As a dev, you're always learning, no matter how experienced you are. I'd love to know more about the kinds of things you're working through and what hiccups you encounter as you get into dev more. :)
Glad you enjoyed the episode! - Aurooba
Great vid! Is there a way of setting the default align value as well? I’d like to set the default align on some of my blocks to “full” instead of “none”
Yes - in your block.json file you can set the default for any attribute:
"attributes": {
"align": {
"type": "string",
"default": "full"
},
}
@@BrianCoords Nice, thanks!
Another great episode! Thank you so much.
It's a great video with lots of insights. But I wonder how did you manage to display the two columnsin edit mode just like in preview mode? In my Block the input fields in edit mode are all linearized underneath another ...
So when setting up your Field Group, each field has a "width" option under the Presentation tab I believe. You can use percentages to get your field to show up in columns.
@@BrianCoords Thanks for your super-quick answer! :) Yes, that's a workaround, but I'm looking for a way, that the edit mode just uses and displays the values of my main stylesheet. Cause there everything is well defined ... like the columns and look of my block etc. Is the problem, that I don't use a block stylesheet? (I just want my main stylesheet to do all styling stuff for the moment ...)
@@carolinmoll5859 Technically any stylesheets that you're loading into the block editor _should_ show up on your ACF Block - is your main stylesheet loaded in the block editor?
@@BrianCoords I must admit, I don't know if it is correctly. I do have registered the stylesheed via the enqueue_block_editor_assets hook. Everything then looks good in preview mode. But if i switch to edit mode, I have only a list of fields without my column context ...
@@BrianCoords Now I know what might be the problem. It's not the stylesheet not beeing loaded ... In Edit mode we have completely different HTML-Block: It's an outer DIV with classes acf-block-fields acf-fields, then inner DIVs with class acf-field ... Any ideas how to put the acf-fields in "our" DIV structure, like we have defined it in our block-php-file?