grabing the attachment from post
-
hello there.. currently, I am creating a template that will display the post based on the category..
this is my way of calling the latest post from the category..<article id = "featuredarticle"> <?php $my_query = new WP_Query('category_name=featured article&posts_per_page=1'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?> <h2><?php the_category();?><h2> <h3><a STYLE="text-decoration:none"href = "<?php the_permalink();?>"><?php the_title();?></a></h3> <p> <?php the_excerpt();?> </p> <?php endwhile; ?> <a href = "#"><img src="https://localhost/wordpress/wp-content/uploads/2011/10/featuredarticle.png" alt="Featured Article"/></a> </article><!--End of Featured Content-->
but.. I left something… the attachment.
the attachment is can be image or video.
how can I call it?thanks in advance..
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘grabing the attachment from post’ is closed to new replies.