/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
add_filter('manage_posts_columns', 'posts_columns_attachment_count', 5); add_action('manage_posts_custom_column', 'posts_custom_columns_attachment_count', 5, 2); function posts_columns_attachment_count($defaults){ $defaults['wps_post_attachments'] = __('Att'); return $defaults; } function posts_custom_columns_attachment_count($column_name, $id){ if($column_name === 'wps_post_attachments'){ if($count !=0){echo $count;} } }