Search shortcode

Relevanssi adds a shortcode to help making links to search results. That way users can easily find more information about a given subject from your blog. The syntax is simple: John Doe This will make the text John Doe a link to search results for John Doe. In case you……want to link to some other search term than the anchor text (necessary in languages like Finnish), you can use: Mr. John Doe Now the search will be for John Doe, but the anchor says Mr. John Doe. One more parameter: setting will wrap the search term in quotation marks,…

Premium 1.7.4

…log which have at least one matching token with the search query. For example, a search for ‘john’ will match previous searches for ‘john blackbourn’ and ‘john smith’ as they both match ‘john’. A search for ‘john blackbourn’ will match a previous search for ‘john smith’ as at least one……token within the search query matches. A search for ‘john blackbourn’ will not suggest a related search of ‘john’ as the function does not suggest previous searches that only consist of one token. Also, it only returns suggestions which have at least two hits and have been queried at least……an additional parameter to make recalculating weight easier. Added a very nice related searches feature by John Blackbourn. This update is recommended to all users of Relevanssi Premium and especially so, if you use AND searches. Relevanssi_match filter The filter is now passed another parameter in addition to the $match…

relevanssi_do_query()

does new WP_Query() and then parse_query( $args ), instead of doing new WP_Query( $args ). This is the preferred way. If you give the arguments to the WP_Query constructor, the query is immediately run. With parse_query(), the query isn’t run; this saves resources. You can use relevanssi_do_query() without a search……query parameter, but in general it doesn’t make much sense. If you’re just doing filtering with taxonomy queries or meta queries, you usually don’t need Relevanssi, as plain WP_Query can do the same without extra overhead. The query object is like expected: the number of found posts is reported in……like using relevanssi_do_query(), do consider first if what you want can be done with a filter function on relevanssi_modify_wp_query. If it can be done that, that’s almost always the right way to do it. Query parameters Relevanssi understands most of the parameters WP_Query does. Here’s the complete list: Taxonomies: tax_query…

Related searches feature

…which have at least one matching token with the current search. Searching for “john” will match both “john blackbourn” and “john smith”. Searching for “john blackbourn” will match “john smith”, but won’t match “john”, because the function doesn’t suggest queries that consist of only one token. Also, only queries that…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:…

Why is a post type excluded from search?

…is registered has not changed: it’s still the same. Relevanssi just doesn’t care about it and still indexes the post. The setting does affect Relevanssi in that when Relevanssi does search posts, Relevanssi does respect this setting and will exclude these posts from the searches. That’s often for the best;…In the list of post types to index in the Relevanssi indexing settings tab there’s a column “Excluded from search”, which has a value of “yes” or “no” for each post type. What does this mean, and why does the value remain “yes” even if you set Relevanssi to index……that post type? This column is strictly for information only, and does not govern what Relevanssi does. This is something that is defined when a post type is registered. Some post types are meant for public use (like post or page) and thus are not excluded from the search. Other…

Why we don’t offer free trials

…without renewing for as long as you wish. Why does Relevanssi Premium cost as much as it does? Selling Relevanssi Premium is our business and main source of income: it keeps us afloat. That’s simple and something most people will agree with. There are people who question selling software licenses,……from a customer’s site. We could do that if the plugin required an activation code. Relevanssi Premium does use license keys. The keys are only used to control access to upgrades and features that use our resources. Currently that means the attachment content reading. This happens on our server and……only way to do that is to buy a license. If it doesn’t work for you, you can get a refund within 30 days without problems or too many questions (though we would really prefer that if you have problems getting Relevanssi to work, you’d at least give us a…

Checklist for searching problems

…Is the search using Relevanssi? Try searching with the Relevanssi admin search at Dashboard > Admin search. Does that search find the results? If it does, your front end search is not using Relevanssi. If it doesn’t, keep on digging. Are there unwanted filters in the search query? The best…When you can’t find the results you want in the search, go through this list of common problems: Is your search term long enough? Relevanssi by default doesn’t index words that are shorter than three letters. Most punctuation gets removed, so if you’re searching for “40+”, that becomes “40”, which……index afterwards. Is the post indexed right? Look at the post you expect to find with the Relevanssi debugger at Settings > Relevanssi > Debugging. Does the word appear there? If the word appears there, keep on digging. If the post is not indexed right, time to figure out why….

Premium 1.5.3

…import settings! User search log is available to user with edit_post capabilities (editor role). There’s also an option to remove Relevanssi branding from the user search logs. Thanks to John Blackbourn. A proper database collation is now set. Thanks to John Blackbourn. UI looks better. Thanks to John Blackbourn. Small…John Blackbourn sent me a patch with several interesting changes to Relevanssi. I’ve implemented those and added a feature that has been requested couple of times. I’ve planned to add it, but haven’t really figured out a good way to do it until now — now you can export and……fixes: spelling corrector uses now correct multibyte string operators, unnecessary taxonomy queries are prevented. Thanks to John Blackbourn. You can now export and import settings. Thanks to ThreeWP Ajax Search for showing me a good (easy) way to do this. ThreeWP Ajax Search, by the way, is an Ajax search…

Premium 1.8

…with spaces instead of removing them. To see this in effect, you need to reindex database. Relevanssi will now disable the default WordPress search when Relevanssi is running. (Thanks to John Blackbourn) You can now set the “Custom fields to index” to “all” to index all custom fields and “visible”……word “cat”. This does not work combined with phrases. “Exclude post from index” metabox now appears on edit pages for all post types, not just post and page. Relevanssi now updates index for posts added with wp_update_post() function. (Thanks to Simon Blackbourn) A pretty impressive list of fixes! Long-time users……it fairly easy to implement. So, you can now use the minus operator as well. It does not work with phrases, but you can add multiple negative words to a query. Indexing and searching attachments works better now. Relevanssi had some trouble searching unattached attachments. Those can be found now….

Divi

Divi and Relevanssi Premium Divi has included a Relevanssi compatibility module from version 4.7 onwards. However, that compatibility module only looks for the free version of Relevanssi and does not activate on Relevanssi Premium. Fortunately fixing this problem is straightforward and only requires one line of code: add_filter( ‘et_builder_plugin_compat_path_relevanssi-premium’, function()…doesn’t use the default excerpts, but instead just truncates the beginning of the post and shows the first 270 characters. That means Relevanssi-generated excerpts don’t show up at all. However, Divi can be configured to show Relevanssi excerpts. Just enable the “Use excerpts when defined” setting in Divi settings, and……on priority 9 on the same relevanssi_post_content filter hook. Indexing Blurbs The Blurb module has important information in the shortcode attributes, which Relevanssi by default does not index. To include the title attribute for the Blurbs, add this to your child theme functions.php: add_filter( ‘relevanssi_pre_excerpt_content’, ‘rlv_shortcode_attribute’, 8 ); add_filter( ‘relevanssi_post_content’,…