Tag Info

Hot answers tagged

6

An attachment is a Post The posts table contains information on the attachemnt post. In WordPress every uploaded media has it's own post entry, where post_type is 'attachment' and post_status is 'inherit'. In fact, you can get attachment post types using functions used to get other post types, like post, page or any CPT. That include WP_Query, ...


1

Working code: // Add custom column with file size info to attachment page add_filter( 'manage_media_columns', 'bb2_manage_media_columns', 10, 2 ); function bb2_manage_media_columns( $columns ) { $columns['filesize'] = __( 'Storlek', 'bb2' ); return $columns; } add_action( 'manage_media_custom_column', 'bb2_manage_media_custom_column', 10, 2 ); ...


1

First is showing the attachment file path, second is file attributes size, type, height, width etc. Thanks attachment in wp_post shows the attachment basic details title, time, author etc. wp_postmeta shows attachment all other details for example attachment would be text, pdf, image etc so it having different meta data for different types of posts. ...



Only top voted, non community-wiki answers of a minimum length are eligible