WordPress.org

Forums

Widget Logic
Trouble to not display a widget in more than 1 page in a multiple language web (2 posts)

  1. nestor86
    Member
    Posted 2 years ago #

    I have a web page which have multiple languages and I also have a different forms for each landing page of the multiple langages. I try to use 'Widget Logic' to assign one form in a determine landing page, but for some reason I canĀ“t get it. I give you an example, I want to do the follow:

    Spanish Form ---> in a Spanish Landing Page
    Russian Form ---> in a Russian Landing Page
    English Form ---> in a English Landing Page

    the problem is that my web is build in a way that I have this kind of url: ZZZ/?lang=ru so when I going to make a code in Widget Logic such as:

    is_page('ZZZ/?lang=ru') the form appers in all the other landing pages (English and Spanish)

    Can you help me?

    Thanx ;)

    http://wordpress.org/extend/plugins/widget-logic/

  2. alanft
    Member
    Plugin Author

    Posted 2 years ago #

    you should be able to do something like

    is_page('ZZZ')

    to match the page (or whatever that ZZZ represents), and

    $_GET['lang']=='ru'

    for the bit after the '?' in the URL, and combine them like

    is_page('ZZZ') && ($_GET['lang']=='ru')

    to target the russian language version of the page

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.