Embedding a lightbed form into a button

Hi there,

I’m using https://guestlist.co/

The instructions I have are as follows;

Here are the instructions for embedding the ‘buy’ button…STEP 1: Add Guestlist to your website
Add the following code onto your website. It should be present on every page you want the Guestlist checkout system to work. If you are using a CMS try looking for a place to “paste code in the head”, “include a script” or similar phrasing.

< script
type=“text/javascript”
async=“true”src=“https://guestlist.co/javascripts/guestlist-embed.js”>
< /script>

(spaces in there so I could post it to forum)

STEP 2: Add a buy button

You can either add the CSS class “guestlist-event-650541" to any element on the page that you want to open the ticket modal, or you can use our button builder to quickly build a custom button for your event. Copy the code where you want your button to appear.

How can I do this so I can apply it to my Registration button? (Link below)

https://employmentwebinars.co.uk/registration/

(I’ve made this from my own account rather than my clients, I can write on this post with his account if you prefer?)

Thank you very much.

Hey @ifkda,

For the script code, insert it in a Raw Content element like the following screenshot.

Then, add the class to the Button element like the screenshot below.

image

Hope that helps.

Hi there,

That worked brilliantly.

however it isn’t performing how I would like.

I created a page; https://employmentwebinars.co.uk/button-test/#

Where I believe it works okay.

However on the page I actually want it to work on, it is seems intermittent, like it will load up as expected (like below);

However on the page I want it to work; https://employmentwebinars.co.uk/registration/

On the first time of loading it is appearing like this;

(I have set the button on the registration page to just go directly to the guestlist page (because customers will be using it and I don’t want it not to work), but I really need the popup modal to work.)

Can you please assist me?

Hello @ifkda,

Unfortunately, I can’t duplicate the issue you were having. Loading properly here for me:


https://screencast-o-matic.com/watch/cYfj1ja3M4

Tested it on CHROME, FIREFOX and EDGE. All working fine.

Hi there,

Would you please look at this again?

Have had 25 complaints today from customers who couldn’t book because of this issue.

It’s the first time my client has used xtheme pro and I assumed him it was a good product.

It really doesn’t give a good impression!

The issue is happening.

Hi @ifkda,

Just to make sure that we are on the same page, our theme does not have anything to do with the problem at hand as the button already has the ID and you already added the script which is not what we have any control over. So the theme itself does not have anything more to do.

You can test that by changing the theme to the standard WordPress theme such as the 2020 and test and see that you will get the same result. It is something related to the script itself.

Having said that, I also could not recreate the problem. It seems to be an intermittent issue that we could not recreate.

I do suggest that you check the cache plugin that you used. It might be the problem cause. You can test that by clearing the cache and disabling the plugin temporarily and see if you get complaints or not.

The other suggestion is to change the place of adding the script. Instead of adding the script into a Raw Content element, add it into the head of your website using your child theme. You can add the code like this into functions.php file of your child theme (In the very end of the file):

function add_script_to_header() { ?>

<script 
   type="text/javascript" 
   async="true" 
   src="https://guestlist.co/javascripts/guestlist-embed.js"> 
</script>

<?php }
add_action('wp_head', 'add_script_to_header');

Then you can delete the raw content. That way you will make sure that the script is loaded before any usage of the website. I think the cache plugin is more of a problem cause.

In general, this is something that you need to check by testing different case scenarios from plugin conflict, cache, … to see why it does not work in some cases.

Thank you for your understanding.

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