[WordPress] 検索結果のマッチした件数を表示させる

2006年11月18日 土曜日 02時11分
E-Mail This Post/Page Print This Post/Page

ちょっとしたコードを追加して、WordPress での検索ページにマッチしたエントリーの件数を表示させることができます。

テンプレートのsearch.php 内の任意の場所に以下のコードを加えます。

PHP:
  1. $mySearch =& new WP_Query("s=$s & showposts=-1");
  2. echo $mySearch->post_count;

また、専用のプラグインもあるようです。

参考URL:  http://wordpress.org/support/t......?replies=6
http://www.mtaylor.co.uk/wordp......count.phps

Share This

この記事に関連するトピック

このエントリーへの Yahoogle Suggestions

One Response to “[WordPress] 検索結果のマッチした件数を表示させる”

Tips Community
Tips Community on 11/26/06 at 1:02 am

検索にヒットした件数を表示…

検索を行った際に、検索結果のページにヒットした件数を表示する方法を見つけたので、早速導入してみました。
わざわざプラグインを利用しなくても、簡単に表示できるんですね~。 (more…)

Trackback this Post |

 

記事ヒット TOP 10

WordPress Tips from Social Bookmarks Jp

    There is no entries available for this category.

WordPress Tips from Social Bookmarks

    There is no entries available for this category.

WordPress Plugins from Social Bookmarks

    There is no entries available for this category.

Tag Cloud

admin Admin Drop Menus Admin Memo Admin Panel advanced drop menus array unique blog cron dabeya Dagon Design Sitemap Generator dropcap Edit N Place error Feedburner game google hack html HTML CSS Internet NEWS Permalink Redirect PHP phpBB2 plugin RSS scripts search stattraq template the content Ultimate Tag Warrior Web Management Windows XP Wordpress WP Plugins WPページ  拡張子 カスタマイズ カスタム関数 カテゴリー コード セキュリティ タグ トップページ トラックバック フィード 投稿 抜粋 日本語 時刻 時間 正規表現 表示 記事

サイト メニュー

Blogtimes image
ぱそずき :D)‐く © 2008
Close
E-mail It