Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ballt

    (@ballt)

    I am really sorry, but i am confused. I read the article 3 times. There is no reference how to display a custom field in a block template.
    The functions.php doesn’t help, because it would show the custom field somewhere. I need it to be in a template.
    to make it concrete: I have an employee template:

    Name ->title of post
    Employee E-Mail -> Custom field
    Employee Title -> Custom field
    Employee Resume -> Post Content

    Again: it’s a Post Template from the new Beta Editor, but is basicly a Gutenberg thing.

    To make it clear could you supply me with a code sample?

    Thanks
    Thomas

    Thread Starter ballt

    (@ballt)

    Thank you for your answer.
    I found the articel you mentioned, it’s very good written.
    Maybe I have a misconseption, but the article only explains how to add in old style block editor.
    With the new beta site builder there is no “single.php” file anymore.
    The templates are created in site builder, I can see the code, but it looks like:

    <!-- wp:group {"layout":{"type":"constrained"}} -->
    <div class="wp-block-group"><!-- wp:spacer {"height":"51px"} -->
    <div style="height:51px" aria-hidden="true" class="wp-block-spacer"></div>
    <!-- /wp:spacer -->

    I am pretty shure I have to add the custom fields in that format, but I can’t find how

Viewing 2 replies - 1 through 2 (of 2 total)