Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPBカップ
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Facetiousを使ってWordPressに高度な検索ボックスを追加する方法

カスタムタクソノミーや 投稿タイプにたくさんのコンテンツがあるサイトを制作している場合、ユーザーがそれを簡単に見つけられるようにしたいと思うでしょう。そのための一つの方法は、ユーザーが検索を絞り込めるようにすることです。過去の記事では、投稿タイプを選択するオプションを備えたWordPressの検索フォームを作成する方法を紹介しました。しかし、手動でテーマにコードを追加する必要がありました。この投稿では、Facetiousを使ってWordPressに高度な検索ボックスを追加する方法を紹介します。

An advanced search form in WordPress

まず最初に、Facetiousプラグインをインストールして有効化する。プラグインを有効化すると、外観 ” ウィジェットの下にFacetious検索ウィジェットが追加されます。Facetious Searchウィジェットをサイドバーやその他のウィジェットエリアにドラッグ&ドロップしてください。

Configuration options for Facetious search widget

このプラグインでは、検索条件のフィールドとして含めるタクソノミーと投稿タイプを選択できます。投稿、ページ、メディアなどの特定の投稿タイプに検索を制限することもできます。Facetiousはまた、WP Super Cacheや W3 Total Cacheのようなキャッシュプラグインとプラグインがうまく動作することを可能にする検索結果ページのカスタムパーマリンク構造を使用しています。

ユーザーはカテゴリーやタグ、その他のオプションを選択して検索結果を絞り込むことができるが、この設定でもWordPressのビルトイン検索機能を使用する。ほとんどの人は、この設定がベストではないという意見に同意するでしょう。そのため、私たちはWordPressにGoogleカスタム検索を追加する方法を書きました。

この投稿が、あなたのWordPressサイトに高度な検索オプションを追加する手助けになれば幸いです。フィードバックやご質問は、Twitterや Facebookで見つけることができます。

情報開示 私たちのコンテンツは読者支援型です。これは、あなたが私たちのリンクの一部をクリックした場合、私たちはコミッションを得ることができることを意味します。 WPBeginnerの資金源 をご覧ください。3$編集プロセスをご覧ください。

アバター

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

究極のWordPressツールキット

ツールキットへの無料アクセス - すべてのプロフェッショナルが持つべきWordPress関連製品とリソースのコレクション!

Reader Interactions

11件のコメント返信を残す

  1. sahil

    This plugin is closed now. please update this post.

    • WPBeginner Support

      Thank you for letting us know, we will certainly keep an eye out for alternative options.

      管理者

  2. Joe

    I’m looking to build a smart and detailed product search page – much like ebay, this would let the user pick various categories, filters, sliders, etc. Is there a recommended WP plugin that could do all this using queries on the backend database?

    Thanks,

    Joe

  3. Steven Denger

    Well the WP Google search is not compatible with my version which is 4.4.3 and if Facetious does not give good search results then I am back to square one – no search box. I am now content on not having a search box after the crazy hassle trying to find one. SearchWP wants $49.00 for their plugin. I would not trust purchasing that for the simple reason that the wordpress search widget that came with my site does not function at all and comes about all scrambled. What is it with Wordpress and Search Boxes anyway?

  4. Steven Denger

    This forum is most of the time very helpful – but all to often it seems to fall into the category of technical info for the more experienced developers. Experienced developers generally do not need help as they are the ones who can answer questions for the one’s like me.
    I cannot believe the technical hassle of trying to put a search box on my site – and exactly where I want it. I have a search widget that comes out all messed up. It displays the box with the name “search” halfway in and half out of the box. Then it says “search” again about an inch below it. All together it takes up and creates a 2 1/2″ space besides not displaying properly. When I try search plugins they are dependant on an existing wordpress search box to be installed to begin with. This is one of very many insanely difficult Wordpress features that takes something one would think to be simple, and make it as impractical and difficult as one could possibly make.
    Like a lot of things that I would like to add to my website, I have to do without because all the help forums are explained like one developer to another instead of made simple enough to just install and use.
    I see the importance of having a search box on my site because it speeds up the searching for a viewer who does not want to dig around for an hour just to find something. But I have given up the idea of ever having one because like a lot of Wordpress additions, it is designed for developers to use instead of the less experienced like myself. And I am experienced enough now that I add everything on my site with code instead of visual – a big advantage when building content in Wordpress.

  5. Steven Denger

    This forum is most of the time very helpful – but all to often it seems to fall into the category of technical info for the more experienced developers. Experienced developers generally do not need help as they are the ones who can answer questions for the one’s like me.
    I cannot believe the technical hassle of trying to put a search box on my site – and exactly where I want it. I have a search widget that comes out all messed up. It displays the box with the name “search” halfway in and half out of the box. Then it says “search” again about an inch below it. All together it takes up and creates a 2 1/2″ space besides not displaying properly. When I try search plugins they are dependant on an existing wordpress search box to be installed to begin with. This is one of very many insanely difficult Wordpress features that takes something one would think to be simple, and make it as impractical and difficult as one could possibly make.
    Like a lot of things that I would like to add to my website, I have to do without because all the help forums are explained like one developer to another instead of made simple enough to just install and use.
    I see the importance of having a search box on my site because it speeds up the searching for a viewer who does not want to dig around for an hour just to find something. But I have given up the idea of ever having one because like a lot of Wordpress additions, it is designed for developers to use instead of the less experienced like myself. And I am experienced enough now that I add everything on my site with code instead of visual – a big advantage when building content in Wordpress.
    I cannot afford a developer to do this so I just give up and have to do without. I have spent enough time on this to build about half of a website.

  6. devi

    need suggestion for online digital library box search

  7. nourteddine

    thanks a lot i was looking for this plugin long time ago

  8. Krish Murali Eswar

    Which is the best option between the four choices:
    1. Word press’s native search
    2. JetPack’s omni search (I am not sure how it works and if it is indeed a search)
    3. Google search for Wordpress
    4. Factitious that you wrote there.

    Would appreciate your help.

  9. Rich

    Awesome tutorial.

返信を残す

コメントありがとうございます。すべてのコメントは私たちのコメントポリシーに従ってモデレートされ、あなたのメールアドレスが公開されることはありませんのでご留意ください。名前欄にキーワードを使用しないでください。個人的で有意義な会話をしましょう。