Continue reading Using Relevanssi in wp_link_query

Using Relevanssi in wp_link_query

If you want to use Relevanssi in the link queries (the search you get when adding links to posts in Classic editor), that’s easy. Make sure Relevanssi is enabled in admin searches, and then add this function: This function will make the Classic Editor link queries use Relevanssi. This approach generally works fine, but if…

Read more Using Relevanssi in wp_link_query 0 Comment on Using Relevanssi in wp_link_query
Continue reading CodeMirror Blocks

CodeMirror Blocks

CodeMirror Blocks is a good plugin for displaying good-looking code blocks in WordPress (you can see it in action right here on Relevanssi.com!). There’s a problem with Relevanssi in-document highlighting and the CodeMirror block, though: enabling the highlighting will break all CodeMirror blocks on the page, even if the highlighting happens outside the block. This…

Read more CodeMirror Blocks 0 Comment on CodeMirror Blocks
Continue reading ACF: Field names appearing in excerpts

ACF: Field names appearing in excerpts

With Advanced Custom Fields, sometimes Relevanssi picks up custom field names to include in the excerpts. This problem happens when you set Relevanssi to index all visible custom fields and have Flexible Content fields. Let’s assume there’s a Flexible Content field with the name flexible_content. It has a layout named field_layout, and in that layout,…

Read more ACF: Field names appearing in excerpts 2 Comments on ACF: Field names appearing in excerpts
Continue reading Gutenberg Full Site Editing

Gutenberg Full Site Editing

There’s something of a compatibility issue between Relevanssi and Gutenberg Full Site Editing. No results are found when you create a Query Loop to display the search results with Relevanssi enabled. The blank results happen because the post template block doesn’t use the Relevanssi results but instead uses a new WP_Query. Since Relevanssi still blocks…

Read more Gutenberg Full Site Editing 2 Comments on Gutenberg Full Site Editing
Continue reading Oxygen and Ninja Tables

Oxygen and Ninja Tables

Relevanssi has support both for Oxygen and Ninja Tables, but the way the Ninja Tables support is done, it’s not working when used with Oxygen. The Ninja Tables support in Relevanssi is looking for the Ninja Tables shortcodes in the post content, but Oxygen keeps everything in custom fields. Fortunately, the fix is simple: you…

Read more Oxygen and Ninja Tables 0 Comment on Oxygen and Ninja Tables
Continue reading ACF: Indexing File field title

ACF: Indexing File field title

I use the ACF field type File for a download section, but the displayed file title is not indexing. The format I return the ACF field data is “File Array (array)”. For Relevanssi, it doesn’t matter which ACF return format you choose. Relevanssi doesn’t use get_field() but instead uses the plain get_post_meta(). That always returns…

Read more ACF: Indexing File field title 0 Comment on ACF: Indexing File field title
Continue reading Proximity sorting

Proximity sorting

Relevanssi Premium 2.16 adds proximity sorting to search results. That means you can sort the search results by geographic location. Instead of having the most relevant matches first, you can have the nearest results first. There are many ways to use geolocation in WordPress. The way Relevanssi does this is flexible but requires some work.…

Read more Proximity sorting 0 Comment on Proximity sorting