Hi there,
I am trying to create a light box for a mailchimp form as outlined in this post – https://kriesi.at/support/topic/lightbox-for-mailchimp-form/#post-582439 – I want to have a mailchimp form open in a lightbox when someone clicks a button. I have tried to implement this advice, but it is not working for me.
I got this error when I tried to add the suggested code to functions php:
Fatal error: Cannot redeclare add_custom_script() (previously declared in /home/tarynwilliams/public_html/wp-content/themes/enfold-child/functions.php:63) in /home/tarynwilliams/public_html/wp-content/themes/enfold-child/functions.php on line 82
Do you have any other ideas on how I can do this? I would like to have the buttons on this page opening with a form.
Thanks very much.
Hey Taryn!
Please try it like that
function add_custom_script_second(){
?>
<script>
jQuery('.open-popup-link').magnificPopup({
type:'inline',
midClick: true
});
</script>
<?php
}
add_action('wp_footer', 'add_custom_script_second');
and do let us know if it works out for you.
Thank u
Regards,
Basilis