Skip to content

wpt_custom_tag

github-actions[bot] edited this page Jun 14, 2026 · 1 revision

Filter the value of a custom template tag.

Auto-generated Example

add_filter(
   'wpt_custom_tag',
    function(
        string $tag_value,
        int $post_ID
    ) {
        // Your code here.
        return $tag_value;
    },
    10,
    2
);

Parameters

  • string $tag_value The output for a custom tag. Default empty.
  • int $post_ID The post ID.

Returns

string

Files

apply_filters( 'wpt_custom_tag', '', $post_ID )

← All Hooks

Clone this wiki locally