Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I, like many others, have numerous links all over my website. Some are in the body, some are in the sidebars, some are in comments. When links go to an external site, I would very much like to have that website's favicon appear to the left of the link. I have seen this in many places. E.g a link to Wikipedia page, should have that wikipedia favicon.

The plugin File Icons appears to do that, but for file types (you link to a PDF, you get a PDF icon). But the question is, how do you do this for general types of links? You could add URLS to the File Icons plugin by hand, but that is a pain, and I have heard of Google's S2 which should find most fav icons automatically.

So my question is; is there a plugin that will auto find any links on a post/page/etc. and insert the URL's fav icon to the left of the text?

share|improve this question
    
You have make the same question here: wordpress.stackexchange.com/questions/7065/… ,you can edit the first question also! –  Philip Jan 27 '11 at 21:33
add comment

2 Answers

up vote 3 down vote accepted

(from the closing duplicate)

I typed this plugin very quickly during posting this...

It seems to work, see http://leau.co (where I quickly tested it) or http://edward.de.leau.net (where I have tested it against more links in the post content) e.g. see the bottom left sidebar or some posts with multiple links in it.

Hmmm, I will add in v0.3:

  • caching
  • file types to ignore
  • if i find out how a different default icon
  • urls to ignore

Notes:

Update:

In the meanwhile it is to version 0.4.8 and scans pages directly for icon tags, /favicon.ico in root, checks google and other provides. IT also can replace content in any area where filters are provided, there is after processing support for the image such as auto png conversion, can excluded urls by extension, provides defaults such as identicons and has a cache.

version 0.4.8 temporarily disables ALL of this (read http://wp.leau.co/2011/03/04/wp-favicons-part-1-preventing-duplication-of-meta-data-attached-to-uris-such-as-favicons/) except for 'check google' so lets wait for 0.4.9 which gets it going again.

share|improve this answer
    
Edelwater - this plugin is so good - all i need is for it to find links in widgets and it is perfect! Any chance you can add that one feature in? –  cmurockstar Jan 28 '11 at 21:02
    
yep. in v0.2 :) –  edelwater Jan 29 '11 at 10:27
    
@cmurockstar: ok. in version 0.2 i added the widget support. See if it works. –  edelwater Jan 29 '11 at 14:12
    
hah - stack exchange just emailed me that you typed this; should we just move our discussion to wordpress forums for the plugin? –  cmurockstar Jan 30 '11 at 7:17
    
sure, nice that you added echo apply_filters ('widget_text',$output); in your widget thats the best way –  edelwater Jan 30 '11 at 19:47
add comment

You can try Karedas Favicon:

Add 16x16 favicon after all the links in your posts. The favicon's tag has a 'favlink' class so you can CSS it as you wish.

There are lots of plugins if you search for "favicon" on the WordPress plugin database.

If you were to develop such a plugin, I wouldn't rely 100% on the Google Service. I would check the link's html, and try to get a favicon in the W3C standard way:

<link rel="icon" type="image/png" href="http://example.com/myicon.png">

In case that code is not present, check for others:

<link rel="Shortcut Icon" href="http://example.com/favicon.ico" type="image/x-icon" />

Or look for the favicon.ico|png file on the domain root (a usual way to use favicons).

If none of these do return an icon, use the S2 service.

share|improve this answer
1  
that is exactly as wordpress.org/extend/plugins/wp-favicons now works :) unfortunately temporary problem: wp.leau.co/2011/03/04/… –  edelwater Mar 4 '11 at 1:13
    
Awesome, good job with the plugin! :) –  Fernando Briano Oct 22 '11 at 16:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.