Support » Plugin: The Events Calendar » Why auto title by ACF is apply to TEC VENUE & ORGANIZER

  • Resolved genepine

    (@genepine)


    I try to make Auto title of TEC, use ACF custom field.
    Ref. http://bit.ly/31IXZNV (in Japanese)
    Result is OK that apply to Title.
    But, ACF custom field ‘tec_theme’ is also apply to VENUE & ORGANIZER
    https://1drv.ms/u/s!AuhoZn9EbBHMgpReEqjsBeG4o4jaZg

    Does anyone know why this issue occur?

    function.php

    
    function my_auto_title($title_message){
        global $post;
        if( $post->post_type == 'tribe_events' ){
    		$tec_theme = get_post_custom_values('tec_theme');
    		if( $tec_theme  ){
                  $tec_title_message = $tec_theme[0];
            }
        }
        return $tec_title_message;
    }
    add_filter('single_post_title', 'my_auto_title');
    add_filter('the_title', 'my_auto_title');
    
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.