• Is there a way to create a new instance of a block outside the loop, elsewhere in a theme? Similar to the_widget() where you can pass an array of the settings and content and have it render without being first created inside a post?

    Basically I’ve created custom styles in my theme for a block, and I want to use that block on front-page.php in a place that is not within the_content(). Or, for example, would there be a way of doing such a thing in the footer of a theme?

    Or, perhaps, could I simply create the block in a post, copy the HTML and the HTML comments from the source, and run it through something like render_block()?

    Obviously this isn’t the place to write a tutorial, but if anyone can tell me whether this is possible and ideally direct me to either the function reference or a tutorial, that’d be helpful!

  • The topic ‘Create new blocks outside the loop?’ is closed to new replies.