About blocks
-
I have a question about block themes and system.
I realized that we still can create plugins with shortcodes that will work like functions.php in classic themes.
What about security in this scenario, what is acomplished with javascript theme and php plugins vs php theme and php plugin? Is it just for speed?
As a someone who relied much on shortcodes and use of custom php templates, I see benefit in block themes that we do not really need custom templates anymore if, if we can have flexibility for block conditions. “If post is in this category, show this block”.
When I want to implement some function to show meta key field inside html + php, that is place where I would usually pull for shortcode in classic theme, but I am not sure what to do in block theme.
For example, I want to call a meta key, do a regex on it, put it in iframe, like for YouTube.
I know I can do first with conditional block plugin and second with genesis blocks plugin, but how to do it without plugins.
It looks like WordPress is moving from php, I don’t see for how long these php tweaks will work, and I really have no clue about creating blocks, it looks complicated, and by explanation it says create a plugin and put php to call block.
Is json what was css, and php is still php, is js then what changes templates like page.php, single.php, I don’t really get it?
Can we have an official tutorial for begginers “From php, html and css to json and js” or something like that?
I read many tutorials and they make zero sense for someone with php, css and html background.
The topic ‘About blocks’ is closed to new replies.