Post Meta Text
Displays a post meta field as text.
Last modified: June 2, 2025
This block displays the value of a post meta field as text.
Select the meta key to display from the block settings panel.
You can also add a fixed label and select the tag for the meta value.
Please note that post meta fields have to be registered with show_in_rest
enabled.
Block name
t2/post-meta-text
Hooks
block-library/src/post-meta-text/block.php
Filters the post meta value.
apply_filters( 't2/blocks/post_meta_text', mixed $value, int $post_id, string $meta_key )
Parameter | Type | Description |
---|---|---|
$value |
mixed |
The post meta value. |
$post_id |
int |
The post ID. |
$meta_key |
string |
The meta key. |
Filters the post meta value.
apply_filters( 't2/blocks/post_meta_text/{$meta_key}', mixed $value, int $post_id, string $meta_key )
Parameter | Type | Description |
---|---|---|
$value |
mixed |
The post meta value. |
$post_id |
int |
The post ID. |
$meta_key |
string |
The meta key. |