DESIGN

Notes about the design on the Web

EC SITE

EC-SITE building and customization of CMS

FLASH

Practice Note for flash and action script

SERVER

Linux VSP and other Rental Server

WORDPRESS

Note the effective use and customization of WordPress

Home » WORDPRESS

WP Simple Tags plugin で Technorati Tag 等を表示

Submitted by Rika on 2008/06/19 – 23:22 4 Comments
WP Simple Tags plugin で Technorati Tag 等を表示

tags
Ultimate Tag WarriorExtended Live Archive セットで使用していた頃が懐かしいです。

Ultimate Tag Warrior は、カスタマイズのし甲斐があって、今になって思えばとても働き者のいいヤツでした。でももう、会えないんですよね(?)
Simple Tags plugin を使うようになって、UTW時代によく見かけていた Technorati や delicious Tags の表示や、Tag の AND,OR 検索を最近見かけないなぁと思って、Simple Tags plugin をよく調べてみたら、ちゃんとできるんですね。(UTW はAJAX でできたけど。)

1.

Tag のアーカイブページに関連タグを表示して、AND検索ができるようにしました。
archive.php

PHP:
  1. <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
  2.         <h2 id="toc--" class="pagename"> <?php single_tag_title(); ?> タグ</h2>
  3.                 <div class="related-tags">
  4.             <?php st_related_tags(); ?>
  5.             <p>+をクリックするとAND検索になります。</p>
  6.                 </div>

And 検索結果から任意のタグを除去して検索するには

PHP:
  1. <?php st_related_tags(); ?>

via: RelatedTags
Demo: wordpress tag archive page
AND, OR はプラグインの設定ページで指定できます。
でも、ページのタイトルが最初のタグだけのままになってしまう。修正の仕方わかりません。

2.

シングルページに Del.ici.ous, Technorati Tagも(ちっちゃく)表示しました。
single.php

PHP:
  1. <ul><li>
  2. <?php st_the_tags(
  3. 'before=Technorati Tags:
  4. &separator=,
  5. &after=
  6. &post_id=
  7. &xformat=%tag_technorati%
  8. &notagtext=No tag for this post
  9. &number=0
  10. '); ?>
  11. </li><li>
  12. <?php st_the_tags(
  13. 'before=Del.ici.ous tag:
  14. &separator=,
  15. &after=
  16. &post_id=
  17. &xformat=%tag_delicious%
  18. &notagtext=No tag for this post
  19. &number=0
  20. '); ?>
  21. </li></ul>

Demo: この下。

関連する投稿

4 Comments »

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.