Dynamic PHP content in Block Theme template file
I would say that the proper process for this would be: Create a Dynamic Block according to the documentation. The article doesn’t mention it, but you will need to use a tool like @wordpress/scripts to be able to write block JavaScript in the style shown in the documentation. The process for creating a block with … Read more