Plugin: Blog Search

Important Note:  The contents of this document applies ONLY to version 5.x.x of Simple:Press.  It likely does NOT apply to version 6.x.x (our latest version).

A Simple:Press plugin to include a search of all the blog posts along with a normal forum search – complete with it’s own results panel

Plugin Requirements

Requires Simple:Press version 5.3 and above.

Plugin Features

  • Allows you to include search results from both WordPress posts and pages alongside forum results.
  • Title labels and text displayed can be set in the Forum Admin interface.
  • Results are shown in two tables. One for the Forum and one for the blog. The results are not combined with each other.

Installing and Activating

After installing and activating there are no necessary forum admin options that you must set but you can change the labels shown to the user when doing a search.
There are 3 options.  The label shown next to the click box that includes blog posts and the two tabs shown in the results. One of which is for forum results and the other for Blog results.

Usage Template Tags


Actions and Hooks Used in Template Tag

In blog-searchclassessp-blog-search-list-class.php
$spdb = apply_filters(‘sph_blog_post_list_query’, $spdb, $this);
In blog-searchclassessp-blog-search-view-class.php
$sfdb = apply_filters(‘sph_blog_search_query’, $sfdb, $this->searchTerm, $searchType, $searchInclude, $this);
$w = apply_filters(‘sph_blog_search_term’, $w, $term, $type, $include);
$s = apply_filters(‘sph_build_search_url’, $s);
In blog-searchlibrarysp-blog-search-view-functions.php
$a = apply_filters(‘sph_BlogSearch_args’, $a);
$a = apply_filters(‘sph_BlogSearchHeaderName_args’, $a);
$label = apply_filters(‘sph_search_label’, $label, $sfvars[‘searchtype’], $sfvars[‘searchinclude’], $term);
$out = apply_filters(‘sph_BlogSearchHeaderName’, $out, $a);
$a = apply_filters(‘sph_BlogSearchPageLinks_args’, $a);
$out = apply_filters(‘sph_BlogSearchPageLinks’, $out, $a);
$a = apply_filters(‘sph_BlogSearchResults_args’, $a);
$a = apply_filters(‘sph_ListBlogTitle_args’, $a);
$out = apply_filters(‘sph_ListBlogTitle’, $out, $a);
$a = apply_filters(‘sph_ListBlogInfo_args’, $a);
$out = apply_filters(‘sph_ListBlogInfo’, $out, $a);
$a = apply_filters(‘sph_ListBlogPost_args’, $a);
$a = apply_filters(‘sph_NoBlogPostsInListMessage_args’, $a);
$out = apply_filters(‘sph_NoBlogPostsInListMessage’, $out, $a);
$a = apply_filters(‘sph_ListBlogIcon_args’, $a);
$out = apply_filters(‘sph_ListBlogIcon’, $out, $a);

Posted in