WordPress Plugins

4 Ways To Show Different Content Based on Translation Language

This tutorial shows you how to display different content for English language readers and othr content for other languages.

You can use the first 2 code snippets for any country supported by the WPML plugin:


There’s 4 code snippets which display different types of content in this post.

  1. The 1st code snippet assumes the use of the Soliloquy slider and the WPML language plugin as its checks that both are installed and active.
  2. The 2nd code snippet includes an example for displaying a different widget and also assumes the use of the WPML language plugin which it checks for. It displays different widgets for French & English.
  3. The 3rd solution doesn’t require the use of a translation plugin however it does check for translated content.
  4. The 4th solution assumes the use of the qtranslate plugin.

Swap out the country codes to suit your own requirements.

Here’s the code for logged in members:

Leave a Reply

Your email address will not be published. Required fields are marked *