PTB Search

About

The Search addon is a WordPress plugin that works together with the Post Type Builder (PTB). It allows you to create a search template that is built specifically for a custom post types, that searches through your post type meta box, taxonomies, and support fields (i.e. title, excerpts, featured image, etc.).

Installing the Plugin

To install the plugin:

  • First, you will need to download the plugin zip file from the Member Area on the Themify site.
    • Note: Some browsers (e.g. Safari) may auto-extract zip files. Right-clicking on the download link and selecting "Save Linked File As" will allow you to download the ZIP version.
  • Then go to your WP Admin > Plugins > Add New > Upload Plugin.
  • Now upload the plugin zip file and click "Install Now".
  • After the plugin is installed, click "Activate Plugin" to activate the plugin.

install-plugin

FYI: If you can't install the plugin using WordPress plugin installer, you may also use a FTP software to install the plugin. To install plugins with an FTP method: extract the plugin zip on your local computer then upload the plugin folder to your FTP server where you installed WordPress > wp-content > plugins folder. Then login to your WP Admin > Plugins to activate the plugin.

How It Works

Note: This plugin will not work without the Post Type Builder (PTB) plugin installed.

  • Install and activate the Search addon plugin
  • Go to your WP Admin > Post Type Builder > Search Templates. Choose any custom post type you've created with PTB, or create a new post type.

search template backend image preview

  • Select the custom post type that you would like to link the search form too. This ensures that only the selected post type is being filtered.

search form backend image preview

How to Build a Search Template

Similar to how you build a PTB Template, you can also build a custom Search Template by dragging and dragging the modules that are built with the post type.

Note: You can build an unlimited number of search templates with just one post type (i.e. Sidebar Search, Page Search, etc.).

search form backend image template

Inserting Search Templates

You can insert a search template on any page, post, widget, or sidebar by copy and pasting the shortcode on a text editor.

search template shortcode

Search Result Location

In case you are using Builder to design the search result page, the [ptb-search-results] shortcode will come in handy. It allows you to control where the search result to display on the page. For example: if you want to display the result in the middle of the layout, just insert the shortcode using the Builder Plain Text mdoule. The following sample shortcode will display the latest movie posts as default, when the search result is triggered, it will swap the movie posts to the result posts.

[ptb-search-results] 
  [ptb type="movie" orderby="date" order="desc" offset="0" posts_per_page="6" style="grid3" logic="or"]
[/ptb-search-results]

How to Import/Export

You can also import/export search templates to any site using the PTB Search Addon. To export a search template click the "export" button on the template, and to import click on the above "Import" button.

how to export/import a search form tempalte

Themify 7.5 has released! Please read the update notes.