Header JS stropped working

Hi friends ate Themeco!

I have a weird problem that is ruining my development on a lightbox form that was working nicely until I changed the forma and added a new link to it. 1.Could this be a server that is not updating 2. Could there be another solution or workaround to get the JS code (that is allowing the lightbox) working for the new link

Best way to explain this is to give the example for the development site. If you go to these two sites you can see the difference in behaviour when pushing the red register button in the right corner of the site:

page 1
http://karlskronaswimrun.betadev.se/karlskronaswimrun/
vs
page 2
http://karlskronaswimrun.betadev.se/karlskronaswimrun/klasser/

The site remains in its url and a lightbox appears and in the other one it moves to the popup site and leaves the page. Almost like the JS that I entered in the editor does not activate the first pages new form:

The pro header has this button link on page 1, that refers to leadpages:
https://kooldigital.leadpages.co/serve-leadbox/my3mKNjEbcLiN3ZdnDHwoH
And this lik on page 2:
https://kooldigital.leadpages.co/serve-leadbox/1401bda73f72a2:121930be0946dc

Child theme functions has this code, that is working with the old form:
// Additional Functions
// =============================================================================

/Add script on the of the site/
add_action( ‘wp_head’, ‘add_head_script’ );
function add_head_script() { ?>

<?php } Best regards Patrik

Hi there,

Thanks for writing in.

I checked and I’m not really sure how it binds the lightbox, but I do notice in your button that the lightbox works and the only difference is having :121930be0946dc in the URL. Could you try adding that too? And please contact the provider of your embed code about this issue. Looks like it’s related to how you should be using the URL.

Thanks!

Thank you again for the fast answer and suggestions. I can’t come up how that url should look but yes seems definitely that there is some kind of change. A newly produced form has its own adress and they do differ. I contacted the provider, so let see!

Sure, please let us know. Are you sure it’s just adding the embed code? Because there should be an integration between the button and your embed code. But unfortunately, I can’t find it even on the working page.

Yes it sounds a bit weird that I got it working on the other button and even the button down on the front-page. Found now this and the last point actually looks like I should do something else then only paste the URL link to the button in the header builder:

Now only a link in the header and the code in the child theme.

OK, now it works =) BIG thank you to @Rad and Themeco support for the dialogue. When you sit there and starting to sweat as the release is coming you joust need someone who asks the right questions and have the dialogue. Replaced the button element with a text element in the header, filled it with the this code that included the script and a bottom that I created. Wish you a great beginning of Christmastimes and upcoming holidays. You Rock!

ANMÄLAN

You’re welcome! We are just glad we were able to help you out.
Cheers.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.