How can i change header button text?(Polylang)

Hello everyone.
I am triying to change header text.
I installed Insert Headers and Footers plugin.

    jQuery(document).ready(function(){
jQuery('html:lang(en) a.button.header-button').attr('href', 'newurl1');
jQuery('html:lang(tr) a.button.header-button').attr('href','newurl2');
           });

This code works.

But I couldn’t change button text.
I tried that:

    jQuery(document).ready(function(){
jQuery('html:lang(en) a.button.header-button').attr('value', 'newtext1');
jQuery('html:lang(tr) a.button.header-button').attr('value','newtext2');
           });

It doesn’t work. What can I do?

Hello,

I would be glad to help you, but can you please provide a link to your website?

Kind Regards, Roman.

1 Like

Please check it :slight_smile:
http://rabiaaydogan.com

Hello, thank you for the link.

Try this jQuery code instead of what you’ve mentioned above:

<script>
    jQuery(document).ready(function(){
        jQuery('html:lang(tr-TR) a.button.header-button').attr('href', '//example.com/');
        jQuery('html:lang(tr-TR) a.button.header-button').html('KEŞFEDİN PORTFÖYÜ');
    });
</script>

Please feel free to ask any other questions that you might have.

Kind Regards, Roman.

1 Like

Thanks so much Roman. It works.
Have a nice day!

Great, you are welcome! And thanks :slight_smile:

Kind Regards, Roman.