WordPress.org

Ready to get started?Download WordPress

Forums

Attachment File Icons (AF Icons)
icons for custom template (4 posts)

  1. danielkleindesign
    Member
    Posted 2 years ago #

    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/

  2. edgustaf
    Member
    Posted 2 years ago #

    I am having the same problem. Did you find a solution.

  3. jeremytarpley
    Member
    Posted 2 years ago #

    Same prob here. Haven't figured it out yet either.

  4. jeremytarpley
    Member
    Posted 2 years ago #

    Well, gave up on this for now - found another plugin that does work with custom post types - File Icons. It hasn't been updated in years but seems to work just fine with the latest 3.2.1 wordpress.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic