Trying to add a second CTA button beside of the LEARN MORE button


#1

Hi,

I’m Trying to add a second CTA button beside of the LEARN MORE button on the Homepage of the Header Slider area on my Sydney pro website. www.bossplayaproductions.com

I found the “Add a second slider button - Sydney” article that I believe gives me the JS code but it doesn’t tell me where in the Theme Editor to paste the code. Am I misunderstanding what to do? Please help! Thanks.


Add another button in the header
Feature Requests: Multiple Hero Buttons and Thumbnail on Lightbox Video Widget
Customize second CTA
Multiple Buy Now links on Home Page
Help with multiple cta buttons
#2

Hello Antonio,

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('a.roll-button.button-slider').after(jQuery('<a href="2ndButtonLink" class="roll-button button-slider">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: 10px;
}

You can add CSS code in DashboardAppearanceCustomizeAdditional CSS (WordPress 4.7 and up). Also you can add CSS code directly to style.css file of your child theme.

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

Kind Regards, Roman.


#3

Hi, I’m also trying to add a second button and the first JavaScript (jQuery) code works fine.
The CSS code doesn’t work and I still see the two buttons too close…
Is that due to the fact that I don’t have Sydney Pro but the free version?
All the best,
Andrea


#4

Hello Andrea,

I don’t think that it’s because of free version.

Can you please provide a link to your website?

Kind Regards, Roman.


#5