Support » Plugins » how to find home page id for different language page

  • Hello,

    I have a multilingual site I’m working on in WPML. I want to prevent some widgets from appearing on the Spanish version of the site. I am using WidgetLogic to do this and I am able to specify the pages to exclude. However, I can’t figure out the conditional statement to exclude the home page for the Spanish site.

    I have the Spanish site set up as

    The conditional tag I’m using for the other pages is:

    I can’t use !is_home() because that will exclude the English home page.

    Any help would be greatly appreciated!

Viewing 8 replies - 1 through 8 (of 8 total)
  • try


    I was looking for something like this. Now how do I use it to exclude the spanish version being used? Or is the “$_” part what excludes it?

    to make a widget appear when the URL has ?lang=esm use the above, to make a widget vanish when that’s the case use


    I was just looking for this… thanks!

    This one is mybe better

    ( ICL_LANGUAGE_CODE == ‘en’ )

    Dealing with the same issue and tried the above suggestions. Not sure if I’ve used the correct syntax as neither of the following does anything. Ideas?


    In Settings > Reading The front page is set to the latest posts.
    Using WPML for translation.


    is_home() && (ICL_LANGUAGE_CODE == ‘en’ )

    for the home page in english

    Thank you for that, Alan.

    What I ended up with was this for the English side:

    is_home() | is_page() && (ICL_LANGUAGE_CODE == 'en' )

    And this for the Spanish side:

    is_home() | is_page() && (ICL_LANGUAGE_CODE == 'es' )


Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘how to find home page id for different language page’ is closed to new replies.