Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #732773

    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.

    • This topic was modified 7 years, 11 months ago by tarynw.
    #732857

    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

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.