• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2662

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

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:

different-countries

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:

Register for full access

Translate Language

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems