apply_filters( 'rps_theme_framework_post_subtitle', string $subtitle, integer $id, boolean, $is_archive )
Parameters
$subtitle string
The subtitle text.
$id integer
The post ID.
$is_archive boolean
True if the context of the subtitle presentation is an archive title.
Example
add_filter( 'rps_theme_framework_post_subtitle', function( $subtitle, $id, $is_archive ) {
if (
! $is_archive and
function_exists( 'get_field' ) and
get_post_type( $id ) == 'my_custom_post_type'
) {
$subtitle = get_field( 'my_custom_field', $id );
}
return $subtitle;
}, 10, 3 );