get attachment image syntax basics
-
I’m not totally well versed in reading api’s so i’m having trouble understanding how to use the wp_get_attachment_image_src (or other appropriate tag) to a list of posts of category ‘3’ and their affiliated photos (as uploaded and using either.
I need the correct tag and syntax for using the file url of a media element for posts of category ‘3’
site: http://howlingwolfmedia.com/site3/classes/instructors/
A sample thumbnail is hardcoded in template to demo desired display.I’ve tried the following but i’m not using it correctly
<?php query_posts('category = 3'); while (have_posts()) : the_post(); ?> <?php wp_get_attachment_image( $attachment_id, $size, $icon, $attr ); ?> <h4 class="bio" style="font-weight:bold;"><?php the_title() ?></h4> <? img src="wp_get_attachment_image" ?><?php the_content(); ?>as well as wp_get_attachment without the img src preface on last line
Do I need to create an actual function to employ this? There already is a function to handle img src attachments in wp-includes/media.php so I’m confused.
The topic ‘get attachment image syntax basics’ is closed to new replies.