Buttons Open In New Window

On my website, starconversations.com , I have a lot of custom buttons I put in. Is there an easy way to make them all open in a separate window when clicked?
I have three on my homepage I want to be fixed (the buttons that say “Try Free Now” or “Enroll Now”!

The buttons are all called “a.button.centered-button”

Hello, you can try to do this with jQuery.

  1. Please install and activate Insert Headers and Footers plugin that will allow you to insert JavaScript (jQuery) code.

  2. Go to your Dashboard → Settings → Insert Headers and Footers → add the following code to Scripts in Header section, and click Save button.

<script>
    jQuery(document).ready(function(){
        jQuery('a.button.centered-button').attr('target', '_blank');
    });
</script>

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

Kind Regards, Roman.

1 Like