Reply To: Different Ad on header when other language

forums forums Circle Flip Support Different Ad on header when other language Reply To: Different Ad on header when other language


Omar
Keymaster
#5288

Hello

Sorry for the untimely response.
Actually it can be easy using the header builder tool
I believe you have it on your 2.1.1 version
You can create 2 similar headers except for the ad area and choose which header to show on which page

I can’t think of another ‘straight forward’ way to do this with the default headers.
However you can achieve this using Custom JS -if you don’t mind running an extra script – by checking the page language and then adding an image to that language’s header
for example
in your English page your HTML tag is

<html class="no-js" lang="en-US" hola_ext_inject="disabled">

your 2nd language will be Russian
That will add a lang to each Russian page, something like

<html class="no-js" lang="ru_RU" hola_ext_inject="disabled">

so in appearance > General > Advanced > Custom JS
add
jQuery("html[lang='ru-RU'] .cr_ad img").attr('src', 'http://link/to/russian/ad/image.jpeg');

Hope this makes sense 🙂

Cheers