Skip to content

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]].

Auto-generated Example

add_filter(
   'wpt_custom_shortcode',
    function(
        string $value,
        int $post_ID,
        string $field
    ) {
        // Your code here.
        return $value;
    },
    10,
    3
);

Parameters

  • string $value Returned singular value of a post meta field, tags stripped.
  • int $post_ID Post ID.
  • string $field Post meta field name.

Returns

string

Files

apply_filters( 'wpt_custom_shortcode', $value, $post_ID, $field )

← All Hooks

Clone this wiki locally