templates – Can I add a default Block to my custom theme?

Question

Lots of plugins provide both shortcodes and PHP for adding elements… either directly in a page or post, or programmatically in a theme template. Is there a process for adding a Block, like Latest Posts, directly to a theme using PHP? I imagine it might be like this:

<?php add_block('latest_posts'); ?>

I’m running 5.9.3.
Thanks!

0
GodWords 4 months 2022-04-18T11:59:50-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse