-
Notifications
You must be signed in to change notification settings - Fork 4
wpt_custom_shortcode
github-actions[bot] edited this page Jun 14, 2026
·
1 revision
Filter the output of a custom field template tag. Custom field tags are marked with [[$field]].
add_filter(
'wpt_custom_shortcode',
function(
string $value,
int $post_ID,
string $field
) {
// Your code here.
return $value;
},
10,
3
);-
string$valueReturned singular value of a post meta field, tags stripped. -
int$post_IDPost ID. -
string$fieldPost meta field name.
string
apply_filters( 'wpt_custom_shortcode', $value, $post_ID, $field )