WP e-Commerce
WP e-Commerce is a popular shopping cart plugin for WordPress. This code by Alexander Gieg, added to functions.php for example, makes Relevanssi work better with WP e-Commerce. Source: WP e-Commerce support in Relevanssi
Knowledge base contains information on how to use Relevanssi. There are lots of features that are documented in the knowledge base. Here's an index to the knowledge base, with all the entries sorted under different topics.
The user manual functions page is also a good place to look at.
WP e-Commerce is a popular shopping cart plugin for WordPress. This code by Alexander Gieg, added to functions.php for example, makes Relevanssi work better with WP e-Commerce. Source: WP e-Commerce support in Relevanssi
When you have problems with Relevanssi, these are the first steps to take: Make sure you have the latest version of Relevanssi. If not, upgrade. Try deactivating the plugin and reactivating it. Are you using Yoast Local SEO? Read this. Try deleting the plugin and reinstalling it from scratch. If that doesn’t help, then approximately…
For some reason setting the post_type query variable to page doesn’t have the desired effect. Other post types (post, custom post types) work, but page doesn’t do anything. This is not a Relevanssi bug, but a WordPress feature (see this trac ticket). If the user inputs a bad value to the post_type query variable, WordPress…
In order to filter search results by category, use the following code: $url = get_bloginfo(’url’); $url = esc_attr(add_query_arg(array(’cat’ => ’10’, ‘s’ => get_search_query()), $url)); echo "<a href=’$url’ rel=’nofollow’>Filter by category 10</a>";$url = get_bloginfo(‘url’); $url = esc_attr(add_query_arg(array(‘cat’ => ’10’, ‘s’ => get_search_query()), $url)); echo "<a href=’$url’ rel=’nofollow’>Filter by category 10</a>"; Put this in your search results…
John Blackbourn wrote a cool related searches feature for Relevanssi Premium. It’s included from version 1.7.4. In order to use the related searches, you must have search logging enabled and a good log of past searches. Then add the following code to your search results template in a suitable place: The first parameter is the…
Deprecated: Relevanssi has long supported searching without a search term. These instructions are not necessary. Version 1.7.3 introduces the possibility to use Relevanssi without a search term. This is useful when you have extra query arguments that can be used to narrow the search, but which would be useful without a search term present. This…
This is a Premium feature and only applies when you index taxonomy terms. This does not apply in free Relevanssi. To include taxonomy pages (categories, tags, custom taxonomies) in the search, enable the option on the options page. There’s also the option to choose which taxonomies are included. By default empty terms (not linked to…
The relevanssi_match hook lets you modify the matches found for queries. It passes a match object, which has the post id ($match->doc), number of hits found in different parts of the post and the weight assigned to the post ($match->weight). Here’s how Relevanssi calculates the weight: Where $idf is the inverse document frequency, aka the…
A standard way to change the number of search results displayed is something like this: Unfortunately, this breaks Relevanssi. Relevanssi hasn’t played nice with posts_per_page in any case, for some reason I don’t really understand — this is legacy code from the original wpSearch plugin. However, from Premium version 1.4.4 and free 2.9.2, you can…
Do you want to have a breakdown of search results by post type? This could be used for example to show a list of post types like books, movies, or albums on a review site, and make them links to limit the search results to that post type. This is fairly easy to do with…