The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

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

  1. danielkleindesign
    Posted 5 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 );

    thank you for your assistance!


  2. edgustaf
    Posted 4 years ago #

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

  3. jeremytarpley
    Posted 4 years ago #

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

  4. jeremytarpley
    Posted 4 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

  • Attachment File Icons (AF Icons)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic