Skip to content

suggestion: add post_name (aka slug) as a column option #1

@hughc

Description

@hughc

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions