How to generate _wp_attachment_metadata code for images?
-
Hi All,
Actually my requirement is, I want to give an option to add image and other text content at user side after user login.
But as per the wordpress image should store in both posts and postmeta tables. In postmeta table there is a record need to add _wp_attachment_metadata for image. I tried to generate this code using
<?php wp_generate_attachment_metadata( $attachment_id, $file ); ?>
But i am not able to generate because i am not able to understand here what are the variables passed to wp_generate_attachment_metadata() function. Means $attachment_id and $file what are all these?
Please help me…
- The topic ‘How to generate _wp_attachment_metadata code for images?’ is closed to new replies.