Block that renders html saved in a php file


I have an html snippet saved as a php file (e.g. mywidget.php):

if (!defined('ABSPATH')) exit;

  foo bar baz

In a separate file mywidget-block.php, how can I create a block that “wraps” the markup from mywidget.php?

The block documentation is quite involved, and I’m hoping to create this simplest of blocks, without having to learn react. All it does is output html saved in some php file.

, lonix 2 years 2019-12-30T08:38:50-05:00 0 Answers 94 views 0

Leave an answer