Created
          April 26, 2020 16:01 
        
      - 
      
- 
        Save annelyse/4e3134286316ed6699f9a49f1979244f to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | add_filter('manage_webinar_posts_columns', 'columns_head'); | |
| add_action('manage_webinar_posts_custom_column', 'columns_content', 10, 2); | |
| function columns_head($defaults) { | |
| $defaults['miniature'] = 'Miniature'; | |
| $defaults['date_du_webinaire'] = 'Date du webinaire'; | |
| unset($defaults['date'] ); | |
| return $defaults; | |
| } | |
| function columns_content($column_name, $post_ID) { | |
| if ($column_name == 'miniature') { | |
| the_post_thumbnail('thumbnail', $post_ID); | |
| } | |
| if ($column_name == 'date_du_webinaire') { | |
| the_field('date_du_webinaire'); | |
| }; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment