You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 makingget_current_post_layouts
a public method and using something like this:The above doesn't work, incidentally, but hopefully illustrates the problem.
The text was updated successfully, but these errors were encountered: