WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Attachment File Icons (AF Icons)] icons for custom template

[Plugin: Attachment File Icons (AF Icons)] icons for custom template

  • danielkleindesign
    Member

    @danielkleindesign

    Hi there,
    this plugin does exactly what i need, in theory. however, i’m having trouble getting the icons to show up in this custom theme i built for a catalog website. i’m still just getting a blank placeholder icon instead of the ones available in the plugin settings.
    is there something i need to add or change here to make it work?

    the following code is that i am using to display the attachments in my single.php template:

    <h3><div class="attachments"><dl class="attachments attachments-small"><?php
    $args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_mime_type' => 'application/pdf, application/x-pdf, application/acrobat, applications/vnd.pdf, text/pdf, text/x-pdf, application/acad, application/x-acad, application/autocad_dwg, image/x-dwg, application/dwg, application/x-dwg, application/x-autocad, image/vnd.dwg, drawing/dwg, application/octet-stream', 'post_status' => null, 'post_parent' => $post->ID );
    $attachments = get_posts($args);
    if ($attachments) {
    	foreach ( $attachments as $attachment ) {
    	?>	<dt class="icon"> <?php echo get_attachment_icon($attachment->ID); ?></dt> <dd class="caption"> <?php echo the_attachment_link( $attachment->ID , false );
    	}
    }
    ?></dd></dl></div></h3>

    thank you for your assistance!

    http://wordpress.org/extend/plugins/attachment-file-icons/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Attachment File Icons (AF Icons)] icons for custom template’ is closed to new replies.