I need to retrieve metadata of files that are not images such as word, excel or pdf documents. I was able to retrieve the metadata when it was attached to a page or post but when its not attached, not getting anything.
I tried using get_post_meta( $post_id );
and wp_get_attachment_metadata( $attachment_id );
I'm only getting the following information when using get_post_meta( $post_id );
:
Array
(
[_wp_attached_file] => Array
(
[0] => 2015/03/test.xlsx
)
[_edit_lock] => Array
(
[0] => 1425404399:741
)
)
Nothing for wp_get_attachment_metadata( $attachment_id );
.