WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

S&P Search by File Type

Break your search up by file types. Implements methods for separating searches by type [post|video|audio|image]

Install

  1. Unzip the sp-search-by-file-type.zip file.
  2. Upload the the sp-search-by-file-type folder (not just the files in it!) to your wp-contents/plugins folder. If you're using FTP, use 'binary' mode.

Activate

  1. In your WordPress administration, go to the Plugins page

Implement

To use this plugin, add links in your search/tags/categories/etc loops that set the type so as to filter the list.

Usage: http://someurl/?type=post|video|audio|image]

Tab Example:

<ul class="search_filters">
    <li><a href="<? bloginfo('url'); ?>?s=<? echo $_GET['s'] ?>">All</a></li>
    <li><a href="<? bloginfo('url'); ?>?s=<? echo $_GET['s'] ?>&type=post">Posts</a></li>
    <li><a href="<? bloginfo('url'); ?>?s=<? echo $_GET['s'] ?>&type=image">Images</a></li>
    <li><a href="<? bloginfo('url'); ?>?s=<? echo $_GET['s'] ?>&type=video">Videos</a></li>
    <li><a href="<? bloginfo('url'); ?>?s=<? echo $_GET['s'] ?>&type=audio">Audio</a></li>
</ul>

get_type($id) can be used within the loop to detect the post mime type.

If you find any bugs or have any ideas, please mail us.

sp_search($type) can be used before query_posts() to restrict results within a template. Example:

sp_search('video');
query_posts();
if (have_posts()) :
// internal loop here
endif;

Requires: 2.5 or higher
Compatible up to: 2.6
Last Updated: 2008-7-28
Downloads: 1,038

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.