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
I'm likely to be an edge case, but I've been rendering blocks on the fly in my templates, via simple function:
function renderBlockById($id) {
// get reusable gutenberg block:
$gblock = get_post($id);
return apply_filters('the_content', $gblock->post_content);
}
In the interests of more readable code, I'd prefer to be passing the 'slug' of a block into this function, but the only place I can get them is from the database itself. Any chance it could be added as an optional column?
The text was updated successfully, but these errors were encountered:
I'm likely to be an edge case, but I've been rendering blocks on the fly in my templates, via simple function:
In the interests of more readable code, I'd prefer to be passing the 'slug' of a block into this function, but the only place I can get them is from the database itself. Any chance it could be added as an optional column?
The text was updated successfully, but these errors were encountered: