closeこの記事は 1 year 10 months 9 days 前に書かれたものです。
最新の情報とは異なる場合がありますので、ご注意ください。

WordPress『Link Indication』は、リンク先のドメイン・拡張子を判別し、aタグにclass属性を付加してくれるWordPressプラグインです。
CSSを定義することにより、リンクに画像・テキストを付加することが出来ます。

プラグイン配布元 → Link Indication Plugin — Software Guide

個人的オススメ度: ★★★★★ 


導入方法

  1. プラグイン配布元から『link-indication.zip』(Download Latest Version 3.2)、
    『images.zip』をダウンロード。
  2. 解凍後、『link-indication.php』をwp-content/pluginsへアップロード。
  3. wp-content/themes/使用中テーマ/style.cssを編集する。

  4. /* For Link Indication plugin */
    a.liexternal { padding-right: 12px; background: url(images/link-icon_external.gif) no-repeat right; }
    a.liwikipedia { padding-right: 14px; background: url(images/link-icon_wikipedia.gif) no-repeat right; }
    a.liimdb { padding-right: 18px; background: url(images/link-icon_imdb.png) no-repeat right; }
    a.liftp { padding-right: 13px; background: url(images/link-icon_ftp.png) no-repeat right; }
    a.limailto { padding-right: 18px; background: url(images/link-icon_mail.png) no-repeat right; }
    a.lipdf { padding-right: 12px; background: url(images/link-icon_pdf.png) no-repeat right;  }
    

    例:プラグイン配布元から。

  5. 『images.zip』を解凍し、wp-content/themes/使用中テーマ/images/にCSS定義に応じた画像を
    アップロードする
  6. 管理画面(Plugins(プラグイン))にて『Link Indication』を有効化。
  7. オプションを設定する。


オプションの設定

Settings > Link Indication
Blog URLs (your internal URLs):
 内部リンクのドメイン指定。(自サイトのURLがデフォルトで入っている)

CSS Class Attributes
 External links: liexternal:外部リンクのクラス名
 FTP links: liftp:ftp://~ のクラス名
 mailto links: limailto:mailto:~ のクラス名
 Internal links: liinternal:内部リンクのクラス名

Specific link types:
 Type:URLまたはファイル
 Search string:検索させる文字列(ドメイン等を指定)
 CSS class:CSSクラス名

Plugin’s Application
 Do not apply the plugin to comments:
  コメントに適用させない場合にチェックを入れる。
 Apply this plugin to the entire blog incl.〜 :
  記事のみだけでなく、ブログ全体に適用させる場合にチェックを入れる。

Miscellaneous Options
 Apply the class attributes also to images) :
  アンカータグ内imgタグにも適用する場合にチェックを入れる。

 Apply target=”_blank”〜:
  外部リンク等を別ウィンドウで開く場合にチェックを入れる。

スクリーンショット

Link IndicationLink Indication Option1Link Indication Option2


動作確認環境

WordPress 2.3.2 , 2.5 , 2.5.1, 2.6
Plugin ver 3.2

TrackBack URI: http://angeblanc.net/2008/05/06/link-indication/trackback/



関連記事

【WP】印刷用ページを作成する。WP-Print

『WP-Print』は記事を印刷用のページに変換し、そのページへのリンクを挿入するWordPressプラグインです。

【WP】リンク先のサムネイルを表示する。Snap Shots™ Plugin

『Snap Shots™ Plugin』は『Snap Shots™』 ((『Snap Shots™』は、リンク先をサムネイルでポップアップ表示してくれるサービス。))を使いやすくしてくれるWordPressプラグインです。

【WP】カテゴリ・アーカイブリストをツリー化する。WP-dTree

『WP-dTree』はカテゴリ・アーカイブ等のリストをツリー表示できるWordPressプラグインです。

【WP】サイドバーにTwitterの投稿を表示する。 Twitter Widget Pro

『Twitter Widget Pro』は、サイドバーにTwitterの投稿を表示するWordPressプラグインです。

【WP】更新情報をTwitterに投稿する。WP to Twitter

『WP to Twitter』はブログの更新情報をTwitterに投稿するWordPressプラグインです。


2 Responses to “【WP】外部リンクをわかりやすく表示する。Link Indication”

  1. [...] こちらが分かりやすく解説してますので参考にして下さい。 【WP】外部リンクをわかりやすく表示する。Link Indication@Ange*Blanc [...]

  2. [...] 【WP】外部リンクをわか りやすく表示する。Link Indication || Ange*Blanc. [...]

Leave a Reply

Back to Top ↑