How can i change header button text?(Polylang)


#1

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?


#2

Hello,

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

Kind Regards, Roman.


#3

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


#4

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.


#5

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


#6

Great, you are welcome! And thanks :slight_smile:

Kind Regards, Roman.


closed #7