• ICL_LANGUAGE_CODE == ‘nl’ &&
    in_category( ‘support’ )

    Is this the correct way to:
    only show widget when wpml is NL
    and there is a slug in the page is /support/

    widget included on:
    /nl/support/
    /nl/support/question

    widget excluded on:
    /de/support/
    /de/support/question
    /nl/other-category/

    I tried several combinations but still don’t get it to work…

    https://wordpress.org/plugins/widget-logic/

Viewing 3 replies - 1 through 3 (of 3 total)
  • I don’t use WPML, but it looks like you are on the right track.

    certainly try the parts separately ICL_LANGUAGE_CODE == ‘nl’ in one widget for instance.

    in_category() will work on individual posts in a specified category , so if that’s what the URL means yes that should work too, and combining them with && will show them when both statements are true

    Hi,
    I have used the following codec: “!is_user_logged_in()” in order to make disappear (to do away) a widget from sidebar, when user is log in. Now widget has disapper from all pages of my web, but no from my HOME PAGE.
    Can you hep me? what is the complete codec in order to do disappear widjet from all page and HOME PAGE too?
    Thank’s a lot for your support.
    Good work.

    Sorry, I want open a new topic but I have had a mistake and I have published here…
    I will go to open a new topic… but if you know the solution you can publish here… I thank you also. 😉
    Good work.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘combine 2 statements’ is closed to new replies.