New update to support hiding language-specific blog entries from archives

Previously, if you create a language-specific blog article using {en} in the title, the Multilingualizer would hide the link to that article for French users. However, in many themes the link is only in the blog title and the other related items also needed to be hidden.

We have released an update which handles this although it requires a little configuration.

In order to know what to hide, you need to configure the ancestor/parent class name so that the Multilingualizer can traverse up the tree from the article link, find the relevant ancestor HTML container and hide the entire thing.

Default Config

In the code you copy/paste to your site, you will find the line below. This is the line you need to edit to allow the Multilingualizer to know which parent elements to hide.

var mlconfig_blog_container_class = '';

How to configure the container class

  1. Visit your blog archive list
  2. Right click any blog link and choose Inspect Element (The developer console will appear with the hyperlink highlighted)
  3. Hover up and down over the parent elements until you discover which element contains the entire row or block for this blog article including it’s image, description, link etc
  4. Put the name of that class in the config, preceded by a period (.)

Example Config

The above screenshot is after right-clicking the article, choosing inspect element, then moving my mouse up the tree until I can visually see the entire blog section highlighted.

In this case, there are two class options:

  • theme-blog-container
  • theme-blog-container-with-cover-image

We can infer from this that theme-blog-container will always exist and the theme-blog-container-with-cover-image will only exist when there is a cover image. So, we’ll use the first class.

We add a period before the class name which tells CSS and JS that this is a class, so our final config for this example becomes:

var mlconfig_blog_container_class = '.theme-blog-container';

Update the code that you injected to your site with this new class name, appropriate to your site, and now language-specific blog articles are correctly hidden from blog archives.

The above functionality is available from version 4.38 onwards, so if you are running an older version, visit your account area and regenerate the code for your site.