-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
For the sake of templating and using Hogan in contexts like page_for_posts, we need a way to retrive Hogan modules by ID. Right now, the closest I can get is by making get_current_post_layouts a public method and using something like this:
/**
* Returns the Hogan modules for a post.
*
* @param \WP_Post $post The post object.
*
* @return string The content.
*/
function hogan_get_layouts( \WP_Post $_post ): string {
$hogan = \Dekode\Hogan\Core::get_instance();
$flexible_content = '';
$modules_content = $hogan->append_modules_content( $post->post_content );
return $modules_content;
}
The above doesn't work, incidentally, but hopefully illustrates the problem.
Reactions are currently unavailable