• Basically my PHP is somewhat lacking (like in its entirety) & I’d like an IF statement to say:

    IF current url ends in "?lang=fr" then <a href="link.php?lang=fr">link</a> ELSE <a href="link.php">link</a>

    If you want the long version: I’ve installed WPML onto a site & am running it in english & french. However the plugin only translates posts & pages.
    I have a text widget in my sidebar with an image that links to another page, and since sidebar widgets are not translated, people currently viewing the french side of the site who click it get sent back to the english side.

    I’m assuming PHP that I put in a text widget will be executed of course?…

    Thanks

  • The topic ‘PHP code please: Sidebar link language dependant’ is closed to new replies.