Working child theme

Hi

I added a second call to action button to the slider.

I added this button by changing the “customizer.php” and the “slider.php” in the inc directory. Now I tried to create a child theme for making these changes permanent.
Unfortunately I can’t make it work with the available child themes.

Any suggestion?

P.s.: Great theme, except of missing button;-)

Nicolas

Dear Nicolas,

Alternatively, you can use custom jQuery code instead of touching theme’s code. You can find the code to use on this documentation. Doesn’t it work for you? Please let me know.

Regards,
Kharis

Dear Kharis,

thanks for your quick reply.

Where do I have to add the jquery code? If I put into the functions.php of my child theme the site goes down…

Best regards,

Nicolas

Dear Nicolas,

Please put it off from functions.php as it shouldn’t be placed in there, but it is for PHP code. To add custom jQuery code, please use the TC Custom JavaScript plugin. Once it is active, navigate to Appearance > Custom JavaScript. Then enter the code into the provided box.

Regards,
Kharis

Hi again

This works.

However I would like the first button to be a “roll-button border” and not a “roll-button button-slider”. Is there any chance to archive this?

Thank you very much.

Nicolas

To achieve it, replace the code with this one:


jQuery(function($) {
       var myButton = '<a href="http://example.org" class="roll-button button-slider">My Button</a>';
       $('.slide-inner .roll-button').addClass('border');     
       $( '.slide-inner' ).append(myButton);	
});

Regards,
Kharis