WordPress.org

Ready to get started?Download WordPress

Forums

EG-Attachments
[resolved] Using media tags to create classes in the URL (3 posts)

  1. iain.norman
    Member
    Posted 2 years ago #

    If this plugin passed the tag into the URL of the document / file you're attaching, you could define an icon for that tag (ie various types of pdf document - whitepaper / brochure / form etc...) could have different icons depending on the tag/class)

    Anyone got any ideas on code or a fix for this?

    http://wordpress.org/extend/plugins/eg-attachments/

  2. iain.norman
    Member
    Posted 2 years ago #

    Part of the way there - I've managed to pass the relevent document tag into the dt icon class by changing <dt class="icon"> to <dt class="icon-'.$tags.'"> on line 552 of eg-attachments-public.inc.php

    might have to change dt to li so I can change the bullet icon for each class.

  3. iain.norman
    Member
    Posted 2 years ago #

    sorted

    Just switch off 'show icons' in the widget settings and update the code below with the following for standard list format (lines 561 - 563 of eg-attachments-public.inc.php)

    $output .= '<li class="attachments attachments-'.$tags.'">'.
    		implode('<br />', $caption_list).
    		'</li>';

    - then just use css to replace the bullet point style with an image.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic