Continue reading Visual Composer: Indexing headings

Visual Composer: Indexing headings

Relevanssi doesn’t by default index the headings in Visual Composer. The vcex_heading shortcode Visual Composer for the headings stores the heading text inside a shortcode attribute. By default, Relevanssi does not index shortcode attributes. In this case, indexing the shortcode attribute is necessary. Fortunately, it’s easy to fix with a simple function added to your…

Read more Visual Composer: Indexing headings 0 Comment on Visual Composer: Indexing headings
Continue reading Visual Composer: Indexing Raw HTML elements

Visual Composer: Indexing Raw HTML elements

Visual Composer and WP Bakery have a Raw HTML element that can be used to add HTML code to your pages. By default, this content is stored in an encoded format Relevanssi can’t read. Fortunately, the encoding is simple Base64 encoding that is easy to read. So, in order to read the contents of the…

Read more Visual Composer: Indexing Raw HTML elements 0 Comment on Visual Composer: Indexing Raw HTML elements
Continue reading Why is a post type excluded from search?

Why is a post type excluded from search?

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…

Read more Why is a post type excluded from search? 0 Comment on Why is a post type excluded from search?
Continue reading Indexing only attributes from shortcodes

Indexing only attributes from shortcodes

I need to add some custom shortcodes to the list of the “removed” ones (so they don’t show in plain text in the results). However, some of them are built like [shortcode_name text=”Need to keep this in results”] and I would like the content in the text parameter to stay in the results. How do I go about this?…

Read more Indexing only attributes from shortcodes 0 Comment on Indexing only attributes from shortcodes
Continue reading Indexing product codes with and without spaces

Indexing product codes with and without spaces

A Relevanssi Premium customer had a problem with product codes. The codes are in the format “ABC 100”, a group of letters and digits with a space in between. Users may search for the codes without the space, so the post should be found with “ABC 100” or “ABC100”. The product codes don’t appear in…

Read more Indexing product codes with and without spaces 8 Comments on Indexing product codes with and without spaces
Continue reading Excluding old content from the search

Excluding old content from the search

Is there a way to exclude anything before 2016 from search results? Yes. There are two approaches to this. If you never want to see anything old in the results, it’s best to filter in indexing with relevanssi_indexing_restriction. Add this to your site: Note that the restriction explains which posts are included in the index,…

Read more Excluding old content from the search 0 Comment on Excluding old content from the search
Continue reading Indexing image captions for the posts

Indexing image captions for the posts

The use case is I run several newspapers, and the “caption” field when uploading media is where the journalists put the photographer credit. We need to be able to index the photographer bylines, but ideally would want to return the story/commentary where their image was used, not the image itself. If you want to index…

Read more Indexing image captions for the posts 0 Comment on Indexing image captions for the posts
Continue reading Indexing embedded PDFs for the parent post

Indexing embedded PDFs for the parent post

Relevanssi can automatically index PDF content for the parent post if the PDF (or other attachment) is attached to the parent post in WordPress. However, that’s not always the case. Sometimes the PDF is attached to the page using an embed, which doesn’t create a connection between the posts in WordPress. Thus, Relevanssi won’t know…

Read more Indexing embedded PDFs for the parent post 5 Comments on Indexing embedded PDFs for the parent post
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