Title: conditional image links
Last modified: May 4, 2019

---

# conditional image links

 *  Resolved [akewowo](https://wordpress.org/support/users/akewowo/)
 * (@akewowo)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/conditional-image-links/)
 * I have a download logo image I want to link to 2 different pdf files depending
   on the lang.
    (see my solution below which works fine )
 * as I do not need to change the picture but only the links, there must be a simpler
   way to do this but I cannot figure it out.
 * I tried to work with the trp tags in the wordpress image links URL but it doesent
   work in the URL in image parameters:
 * [trp_language language=”fr_FR”] http//:www.art-brut.ch[/trp_language]
 * how would it be possible to enable the trp tags in image links? in fuctions_php
   somewhere?
 * thank you
 * Cyril
 * my actual solution:
    ________________________
 * [trp_language language=”de_CH”] <figure class=”wp-block-image is-resized”>[](http://www.steffgruber.com/wp-content/uploads/2019/05/Steff_Gruber_Interview_Kunstszene_1977_DE.pdf)
   </figure>[/trp_language][trp_language language=”en_GB”]<figure class=”wp-block-
   image is-resized”>[](http://www.steffgruber.com/wp-content/uploads/2019/05/Steff_Gruber_Interview_Kunstszene_1977_EN.pdf)
   </figure>[/trp_language]
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fconditional-image-links%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Cristian Antohe](https://wordpress.org/support/users/sareiodata/)
 * (@sareiodata)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/conditional-image-links/#post-11509254)
 * The simplest way would be to add “translation block” on the logo. : [https://translatepress.com/docs/translation-editor/#translation-blocks](https://translatepress.com/docs/translation-editor/#translation-blocks)
 * This way you’ll be able to translate the HTML. You’ll need to change the output
   of your theme, but that can be done by creating a child theme, so you don’t make
   changes to the main theme: [https://developer.wordpress.org/themes/advanced-topics/child-themes/](https://developer.wordpress.org/themes/advanced-topics/child-themes/)
 *  Plugin Author [adispiac](https://wordpress.org/support/users/adispiac/)
 * (@adispiac)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/conditional-image-links/#post-11678399)
 * You can also look into translating images containing links and replace only the
   anchor link: [https://translatepress.com/translate-images-in-wordpress/](https://translatepress.com/translate-images-in-wordpress/)

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

The topic ‘conditional image links’ is closed to new replies.

 * ![](https://ps.w.org/translatepress-multilingual/assets/icon.svg?rev=3166541)
 * [Translate Multilingual sites - TranslatePress](https://wordpress.org/plugins/translatepress-multilingual/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/translatepress-multilingual/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/translatepress-multilingual/)
 * [Active Topics](https://wordpress.org/support/plugin/translatepress-multilingual/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/translatepress-multilingual/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/translatepress-multilingual/reviews/)

## Tags

 * [conditional](https://wordpress.org/support/topic-tag/conditional/)

 * 2 replies
 * 3 participants
 * Last reply from: [adispiac](https://wordpress.org/support/users/adispiac/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/conditional-image-links/#post-11678399)
 * Status: resolved