Add another button in the header

Hi Support,

Is is possible to add an extra clickable button in the header?

Thanks.

Aron

Hello Aron,

You can add second button 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 DashboardSettingsInsert Headers and Footers → add the following code to Scripts in Header section, and click Save button:

<script>
    jQuery(document).ready(function(){
        jQuery('.header-info .roll-button').after(jQuery('<a href="2ndButtonLink" class="roll-button">2ndButtonName</a>'));
    });
</script>

Please replace 2ndButtonLink and 2ndButtonName with desirable values.

Also you might want to add some space between buttons with the following CSS code:

.roll-button {
    margin-left: 15px;
    margin-right: 15px;
}

You can add CSS code in Dashboard → Appearance → Customize → Additional CSS.

Kind Regards, Roman.

Thanks so much Roman! It worked! Awesome!

Kind Regards,
Aron Verhoeven

Great! You are welcome Aron! :slight_smile:

Kind Regards, Roman.

Hi Roman,

I’ve made some changes on my website, but suddenly the second button was gone…

I have set the code back in the Headers and Footers plugin, but unfortunatley, the second button is gone…

www.purpleapple.nl

Can you see what is wrong?

Kind Regards,
Aron Verhoeven

Hello Aron,

There is Sydney Pro theme currently used on that website, the code above is for Rocked theme, so it’s completely normal that it doesn’t work on that website.

Please check this topic:

Kind Regards, Roman.

Wow… How could I mis that… :sweat_smile:

Thanks Roman!

Kind Regards,
Aron Verhoeven

You are welcome Aron! :slight_smile:

Kind Regards, Roman.