Affichage des articles dont le libellé est Icons. Afficher tous les articles
Affichage des articles dont le libellé est Icons. Afficher tous les articles

samedi 12 novembre 2016

How to Add Attachment File Type Icons in WordPress



Have you seen websites that show file icons next to the download links? Recently one of our readers asked if it was possible to display attachment file icons in WordPress. Yes it is, and it’s quite easy. In this article, we will show you how to add attachment file icons in WordPress.


Adding file type icons for attachments in WordPress


When You Need Attachment File Icons in WordPress


By default, WordPress allows you to upload images, audio, video, and other documents. You can also allow additional file types to be uploaded in WordPress.


When you upload a file through the media uploader and add it to a post or page, WordPress will try to embed the file if it is an image, audio, video, or in a supported file format.


For all other files, it will just add a file name as plain text and link it to the download or attachment page.


Text links for attachments with no icons for file type


In the above screenshot, we have added a PDF and a Docx file. However, it is difficult for a user to guess which file they are downloading.


If you regularly upload different file types, then you may want to display an icon next to the link, so your users can easily find the file type they’re looking for.


Having said that, let’s see how to add attachment file icons in WordPress for different file types.


Method 1: Add Attachment File Icons in WordPress Using Plugin


First thing you need to do is install and activate the MimeTypes Link Icons plugin. For more details, see our step by step guide on how to install a WordPress plugin.


Upon activation, you need to visit Settings » MimeType Icons page to configure plugin settings.


MimeType Link Icon settings


The plugin allows you to choose icon size. You can also choose between png and gif icons. Next, you need to choose the icon alignment and which file types will display the icon.


Under the advanced options, you can enable CSS classes to hide icons. File download links wrapped in these CSS classes will not show the icons.


Advanced settings


Below that you will find the option to show file size next to the download link. It is turned off by default, as it could be resource intensive. However if you like, you can enable it and also enable the option to ‘Cache retrieved file sizes’.


Don’t forget to click on the Save Changes button to store your settings.


You can now edit a post or page and add an file download link using media uploader. Preview your post and you will see the file icon next to the download link.


Attachment links with file type icons


Method 2: Using Icon Fonts for Attachment Files in WordPress


In this method, we will be using an icon font to display an icon next to attachment file link.


First thing you need to do is install and activate the Better Font Awesome plugin.


Upon activation, you can edit a post or page where want to add an attachment link.


You will notice the new ‘Insert Icon’ button on top of post editor. Clicking on it will display a popup where you can search and select the icon you want to add.


Insert icon into your WordPress post


Font Awesome comes with tons of icons and has icons for the most commonly used file types. Click on the icon you want to add and the plugin will automatically add the required shortcode in the post editor.


Now you can upload your file and insert into post using media uploader.


Add attachment links


You can also add your own custom CSS for a file icon by adding your own css class to the shortcode like this:


[icon name=”file-pdf-o” class=”” unprefixed_class=”pdf-icon”]


You can now use .pdf-icon class to change icon size, color, and style it to your own needs.


Font icons used as attachment file type icons


We hope this article helped you learn how to add attachment file icons in WordPress. You may also want to see our guide on how to how to embed PDF, spreadsheet, and others in WordPress blog posts.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


The post How to Add Attachment File Type Icons in WordPress appeared first on WPBeginner.







Square: 30 Flat Design Social Media Icons



alt="Square: 30 Flat Design Social Media Icons" src="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2013/10/preview_flat_social_icons_v2-500x408_t.jpg" />

style="text-align: center;">class="aligncenter size-full wp-image-7235 border" src="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2013/10/preview_flat_social_icons_v2.jpg" alt="Free Flat Social Media Icons - Square" width="750" height="613" srcset="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2013/10/preview_flat_social_icons_v2.jpg 750w, http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2013/10/preview_flat_social_icons_v2-300x245.jpg 300w" sizes="(max-width: 750px) 100vw, 750px" />

class="row-fluid">class="span6">

class="meteor-icon circle" style="font-size:12px !important;">
class="rounded icon-desktop black1-bg" style="width: 12px; height: 12px; color:#fff !important; padding: 8px !important;">
Icon Set Details

One of the most popular design trends recently is flat – it has been cropping up all over the web. If you are searching for some flat designed icons for your next project, then this post is for you. This beautiful set of 30 social media icons come in .png, .psd, and .ico formats, size 512×512 px, for download. As usual, this set of icons are free for both commercial and non-commercial use with a link credit to this page.

class="meteor-icon" style="font-size:13px !important;">
class="icon-file-text-alt" style="color:inherit !important;">
Package Details

  • File Format: .png, .ico, .psd
  • License: href="http://creativecommons.org/licenses/by-nd/3.0/" target="_blank">Attribution-NoDerivs 3.0 Unported
  • Download Size: 1.4 MB
  • Icon Size: 512 x 512 px
  • Number of Icons: 30
  • Release Date: October 30, 2013
  • Designer: Probal Kumar D.
  • style="line-height: 1.5em;">Released by: Web Hosting Secret Revealed (WHSR)

class="span6">

Take Action Now

Download Sketchy Icon Sets (.png, .ico, .psd; 512x512px) here.

style="text-align: center;">class="meteor-capsule" href="http://www.webhostingsecretrevealed.net/downloads/icons/square-512.zip">Download Leaf (.zip)

* Please support our designers by sharing and linking back to this page, thank you.


Page 17 – Web Hosting Secret Revealed




X’mas 2013: Beautiful Christmas Icons



alt="X’mas 2013: Beautiful Christmas Icons" src="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2013/12/xmas-icon-500x500_c.jpg" />

style="text-align: center;">class="aligncenter size-full wp-image-7658 border" src="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2013/12/xmas-icon.jpg" alt="X'mas Icons" width="750" height="750" srcset="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2013/12/xmas-icon.jpg 750w, http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2013/12/xmas-icon-150x150.jpg 150w, http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2013/12/xmas-icon-300x300.jpg 300w, http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2013/12/xmas-icon-130x130.jpg 130w" sizes="(max-width: 750px) 100vw, 750px" />

class="row-fluid">class="span6">

class="meteor-icon circle" style="font-size:12px !important;">
class="rounded icon-desktop black1-bg" style="width: 12px; height: 12px; color:#fff !important; padding: 8px !important;">
Icon Set Details

Happy Thanksgiving! You knew it’s that holiday season again when you celebrate Thanksgiving and Black Friday Shopping Day. That’s right, we are now stepping into the last month of 2013 and Christmas is just 20+ days aways. To celebrate this year X’mas, WHSR is giving out 20 free Christmas-themed icons for free. Designed by cartoonist Andre Adams, this set of beautiful icons would be the perfect fit to your website during this holiday season. As usual, icons posted here are free for both non-commercial and commercial use as long as you link back to this page and credit WHSR as the original source.

class="meteor-icon" style="font-size:13px !important;">
class="icon-file-text-alt" style="color:inherit !important;">
Package Details

  • File Format: .png, .ico, .icns
  • License: href="http://creativecommons.org/licenses/by-nd/3.0/" target="_blank">Attribution-NoDerivs 3.0 Unported
  • Download Size: 7.3 MB
  • Icon Size: 256 x 256 px
  • Number of Icons: 20
  • Release Date: December 02, 2013
  • Designer: Andre Adams
  • style="line-height: 1.5em;">Released by: Web Hosting Secret Revealed (WHSR)

class="span6">

Take Action Now

Download X’mas 2013 Icon Sets (.png, .ico, .icns; 256x256px) here.

style="text-align: center;">class="meteor-capsule" href="http://www.webhostingsecretrevealed.net/downloads/icons/whsr_xmas2013-256.zip">Download X'mas 2013 (.zip)

* Please support our designers by sharing and linking back to this page, thank you.


Page 16 – Web Hosting Secret Revealed




Vecteezy Transport Icons – 70 Flat Designed Icons



alt="Vecteezy Transport Icons – 70 Flat Designed Icons" src="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/05/transports-icons-500x812_c.jpg" />

 

class="aligncenter size-full wp-image-9710" src="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/05/transports-icons.jpg" alt="Transport icons" width="750" height="1219" srcset="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/05/transports-icons.jpg 750w, http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2014/05/transports-icons-184x300.jpg 184w" sizes="(max-width: 750px) 100vw, 750px" />

class="row-fluid">class="span6">

class="meteor-icon circle" style="font-size:12px !important;">
class="rounded icon-desktop black1-bg" style="width: 12px; height: 12px; color:#fff !important; padding: 8px !important;">
Icon Set Details

We are featuring another set of 70 fresh traffic/transport icons in .ai and .psd format this May. The icon set is exclusively designed by Vecteezy.com for WHSR readers. The set comes in two different colors (white and grey background) and is available in one single PSD and AI file (easy storage!).

As usual, icons are 100% free for your own uses long as you credit the designer and Web Hosting Secret Revealed the original designer and publisher. We just need a link pointing to our sites – that isn’t too hard, right? ;)

About Vecteezy

Vecteezy is a community of vector art. The website provide a place for vector artists to create and exchange a variety of free vector graphics including icons, patterns, swirls, flourishes and other cool stuff to enhance your designs and creativity. The best way to get started at Vecteezy is to create a free account and learn about the available features.

class="meteor-icon" style="font-size:14px !important;">
class="icon-file-text-alt" style="color:inherit !important;">
 title="Vecteezy - Free icons, vector, illustrations, and PSDs" href="http://www.vecteezy.com/" target="_blank">Visit Vecteezy online

class="span6">

Take Action Now

Download Traffic/Transport Icon Sets (.ai & .psd) here.

style="text-align: center;">class="meteor-capsule" href="http://www.webhostingsecretrevealed.net/downloads/icons/transport.zip">Download Transport Icons (.zip)

class="meteor-icon" style="font-size:14px !important;">
class="icon-file-text-alt" style="color:inherit !important;">
Package Details

  • File Format: .ai & .psd
  • License: href="http://creativecommons.org/licenses/by-nd/3.0/" target="_blank">Attribution-NoDerivs 3.0 Unported
  • Download Size: 3.05 MB
  • Number of Icons: 70
  • Release Date: May 24, 2014
  • Designer: Vecteezy.com
  • Released by: Web Hosting Secret Revealed (WHSR)

* Please support designers by sharing and linking back to this page, thank you.

 


Page 14 – Web Hosting Secret Revealed