Continue reading Indexing HTML comments

Indexing HTML comments

By default, Relevanssi does not index HTML comments inside your posts. Relevanssi removes all HTML tags before indexing, and HTML comments (<!– like this –>) are counted as HTML tags. If you have content inside comments that you want to be indexed, you need to modify the punctuation control – which is responsible for removing…

Read more Indexing HTML comments 0 Comment on Indexing HTML comments
Continue reading Toolset Views

Toolset Views

Relevanssi works fine with Toolset, thanks to a lot of compatibility code the makers of Toolset have included in it to make it work with Relevanssi. However, everything doesn’t work automatically without modifications. The key thing to notice with Toolset is that query variables and filters don’t work the way you’d expect. Because of the…

Read more Toolset Views 6 Comments on Toolset Views
Continue reading Indexing post slugs

Indexing post slugs

By default, Relevanssi does not index the post slug. It is, however, an easy thing to fix using the relevanssi_content_to_index filter hook. This function will read the post slug, replace the hyphens with spaces (so that indexing-post-slugs becomes “indexing post slugs”) and add the slug to the post content. Add this function to your site…

Read more Indexing post slugs 0 Comment on Indexing post slugs
Continue reading Restricting the search for non-logged-in users

Restricting the search for non-logged-in users

There was an interesting support question: I have website with logged-in users as well as non-logged-in users. The logged-in user should be able to search through everything on the website, but the non-logged-in users should only be able to search the user profiles. Is it at all possible to differentiate the searches like this? The…

Read more Restricting the search for non-logged-in users 3 Comments on Restricting the search for non-logged-in users
Continue reading Gmedia photo gallery tags

Gmedia photo gallery tags

Gmedia photo gallery gives a false impression of working with Relevanssi, as you can see the gmedia_tag taxonomy appear in the list of taxonomies: However, if you try to index those tags, you’ll soon notice Relevanssi isn’t actually indexing them. That’s because Gmedia gallery doesn’t use that taxonomy for the tags. The tags are actually…

Read more Gmedia photo gallery tags 0 Comment on Gmedia photo gallery tags
Continue reading Blocking pre and code tags

Blocking pre and code tags

If your posts have lots of programming code examples in <pre> and <code> tags, those might look pretty bad in the search results. A snippet of programming code isn’t usually a good excerpt, and if you use those tags purely for code snippets, they won’t likely contain significant search content, either. Fortunately it’s easy to…

Read more Blocking pre and code tags 0 Comment on Blocking pre and code tags