From the course: PHP for WordPress
Unlock this course with a free trial
Join today to access over 24,400 courses taught by industry experts.
PHP in the Block Editor
From the course: PHP for WordPress
PHP in the Block Editor
- [Narrator] Now that the block editor and site editor are the primary methods of making WordPress themes, it's good to know what's available to you in PHP for you to leverage when doing WordPress development. This won't tell you exactly how to develop a WordPress theme, there are other helpful courses and resources for that. But if you're going to leverage PHP for the block editor, there are a few helpful functions. The first is a function called do_blocks. If you want to convert a set of HTML comments into actual blocks, then do_blocks is the function for you. This is especially helpful if you have some block patterns that you've exported from the actual block editor that you want to use in a theme or plugin. If there's a block template part, header, footer, sidebar, et cetera, you want to use in your theme or plugin, you can call the function block_template_part. There are also specific functions for both the header area and footer area. If you want some more information on how all…
Contents
-
-
-
-
-
-
(Locked)
The functions file2m 53s
-
(Locked)
Copying Hello Dolly5m 3s
-
(Locked)
WP_Query4m 10s
-
(Locked)
Hooks, actions, and filters4m 41s
-
(Locked)
PHP in the Block Editor1m 29s
-
(Locked)
Theme development in the age of the Block Editor3m 3s
-
(Locked)
Creating a plugin10m 56s
-
(Locked)
Is PHP enough?1m 42s
-
(Locked)
-