dynamically get attachment id ?
-
Firstly, this plugin is very useful, thanks for the hard work creating it.
Your notes say :
$pdf_id = ‘your pdf file ID’;
if ( $thumbnail_id = get_post_meta( $pdf_id, ‘_thumbnail_id’, true ) ) {
echo ‘‘.wp_get_attachment_image ( $thumbnail_id, ‘medium’ ).’‘;
}Which is great, however, i want to use this information in a template file, and need to get the PDF file ID dynamically, each post will have a different file ID – how would i go about doing this?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘dynamically get attachment id ?’ is closed to new replies.