Filters – team_grid_filter_meta

Vew count: 240
add_filter('team_grid_filter_meta',  'team_grid_filter_meta_extra' );

function team_grid_filter_meta_extra($meta_html){
  
  
  $new_position = get_post_meta(get_the_ID(),'new_position', true);
  
    return $meta_html.' , <a href="#">'.$new_position.'</a>';
  }

Display custom meta field on single team member page

function team_grid_filter_meta_extra($html_social){

  if( is_singular('team_member')){

      $team_address = get_post_meta(get_the_id(),'team_address', true);
    $team_language = get_post_meta(get_the_id(),'team_language', true);


    $html_social.= '<div class="team-container">';
    $html_social.= '<div class="team_address">Address:'.$team_address.'</div>';
    $html_social.= '<div class="team_language">Language:'.$team_language.'</div>';

        $html_social.= '</div>';


    echo $html_social;

  }
  else{
    echo $html_social;
  }

}

add_filter('team_grid_filter_social','team_grid_filter_meta_extra');