1
vote
What is the "correct" way to add hooks or similar PHP behavior to a blocktheme?
For Block Themes PHP I use register_block_style to setup selectable style variations, create custom shortcodes, and I filter render_block.
Here's a couple of PHP examples:
add_shortcode( '...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
theme-development × 4436themes × 712
php × 429
plugin-development × 411
functions × 302
customization × 280
plugins × 271
css × 220
custom-post-types × 212
theme-customizer × 206
menus × 194
child-theme × 194
loop × 160
theme-options × 151
templates × 144
images × 125
posts × 114
widgets × 114
wp-query × 110
javascript × 104
jquery × 103
categories × 101
page-template × 89
pages × 88
filters × 78