Continue reading Adding a search form in the navigation menu

Adding a search form in the navigation menu

WordPress doesn’t make adding a search form in the navigation menu easy. It’s a popular request, though, and having access to the search in the site header is typical. Relevanssi itself doesn’t have opinions on the user interface. Some themes, like Twenty Twenty, include a built-in search feature in the header. That’s a good reference…

Read more Adding a search form in the navigation menu 0 Comment on Adding a search form in the navigation menu
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 4 Comments on ACF: Field names appearing in excerpts
Continue reading Gutenberg Full Site Editing

Gutenberg Full Site Editing

There’s 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 the default…

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