![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I’m trying to create a page template that shows the post title, excerpt and a link to the attachment. I’ve been using this code: Code:
<?php $args = array( 'post_type' ?> 'attachment', 'numberposts' => null, 'post_status' => null, 'post_parent' => $post->ID ); $attachments = get_posts($args); if ($attachments) { foreach ($attachments as $attachment) { echo apply_filters('the_title', $attachment->post_title); the_attachment_link($attachment->ID, false); } }?>
POST TITLE / POST EXCERPT / DOCUMENT23 .DOC How do I achieve this: POST TITLE / POST EXCERPT / CLICK HERE TO DOWNLOAD Any help much appreciated, Thanks, Jon. |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Attachment.php / Image.php Page Help | ruibo | General Discussion | 1 | 07-04-2009 10:21 PM |
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us