Jump to content

Customise/Style Eventbrite embedded “buy tickets” button to match site buttons

Go to solution Solved by tuanphan,

Recommended Posts

Site URL: https://www.londonwanders.com/

I would be really grateful if someone out there could help me please. I know nothing about coding, except how to cut and paste it! This same question was asked on here back in January but the answer was specific to that person's styling, and as I do not understand coding, I am really hoping, given the information below, that someone would kindly give me the code I need for my site. Thank you! Here’s the details:

I’ve added a scripted Eventbrite ticket sales button to my website, which keeps customers on your website to make the booking, rather than linking to the external eventbrite page. This is a new and better way of doing things. BUT the E’brite “buy tickets” button looks terrible. I would like to style it the same as the red “book/book now” buttons already on my site. These buttons are links to the E’brite site. If I can style the scripted Eventbrite ticket sales button to look like the others, then I can get rid of the link buttons and just use the scripted embedded ones.

On the “welcome” page of my site you will see the E’brite scripted “buy tickets” button and below this the standard Squarespace “book now” button, that is a link.

Here is the code for the scripted button, and below that the styling details of my red squarespace button: 
<!-- Noscript content for added SEO -->

<noscript><a href="https://missguideds-londonwanders.eventbrite.co.uk" rel="noopener noreferrer" target="_blank"></noscript>

<!-- You can customize this button any way you like -->

<button id="eventbrite-widget-modal-trigger-18924204806" type="button">Buy Tickets</button>

<noscript></a>Buy Tickets on Eventbrite</noscript>

 

<script src="https://www.eventbrite.co.uk/static/widgets/eb_widgets.js"></script>

 

<script type="text/javascript">

    var exampleCallback = function() {

        console.log('Order complete!');

    };

 

    window.EBWidgets.createWidget({

        widgetType: 'checkout',

        eventId: '18924204806',

        modal: true,

        modalTriggerElementId: 'eventbrite-widget-modal-trigger-18924204806',

        onOrderComplete: exampleCallback

    });

</script>

Styling details of my red Squarespace button:-
Button block               small
Button colour              hsla(352, 94%, 49%, 0.85)
Text colour                  hsla(0, 1%, 7%)
Small button style       solid
Small button shape      pill
Font                             Proxima Nova
Weight                        700
Style                            normal
Size                             16px
Letter spacing             1.58px
Text transform            lowercase

 

If anyone can help I’ll be incredibly grateful. Thank you very much!

buttons.JPG

Link to comment
  • Solution

 Add to Design > Custom CSS

/* Buy tickets button */
button#eventbrite-widget-modal-trigger-18924204806 {
    font-family: proxima-nova;
    font-size: 16px;
    font-weight: 700;
    font-style: normal;
    text-transform: lowercase;
    letter-spacing: 1.58px;
    color: #121212;
    background-color: rgba(242,7,39,.85);
    border-color: rgba(242,7,39,.85);
    padding: 10px;
    border-radius: 100px;
    box-shadow: none !important;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 9 months later...
32 minutes ago, arielestulin said:

is there a way to have this code customize ALL eventbrite button?

Yes, if you can add a class to the eventbrite button when you paste in the code you can then use this to target all the buttons with the same class.

For example:

<button class="myeventbutton" id="eventbrite......

And then you'd put your styles within this:

button.myeventbutton {

}

 

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
  • 1 month later...
On 2/25/2022 at 3:59 PM, paul2009 said:

Yes, if you can add a class to the eventbrite button when you paste in the code you can then use this to target all the buttons with the same class.

For example:

<button class="myeventbutton" id="eventbrite......

And then you'd put your styles within this:

button.myeventbutton {

}

 

Looking for this as well, I was able to style the individual button but this will save a lot of time. What would be the proper way to list multiple id's in that class (looking for what fills in those elipses in your example?)

Thanks!

Link to comment
1 hour ago, lamdra said:

What would be the proper way to list multiple IDs in that class (looking for what fills in those ellipses in your example?)

The ellipses is the unique reference for your eventbrite event, which is why I haven't shown it. To style all the buttons in the same way, simply add the class as I explained, and then refer to this class in your Custom CSS instead of referring to the ID. If you need more help, please provide some details of the code you have added and what isn't working for you.

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
10 minutes ago, paul2009 said:

The ellipses is the unique reference for your eventbrite event, which is why I haven't shown it. To style all the buttons in the same way, simply add the class as I explained, and then refer to this class in your Custom CSS instead of referring to the ID. If you need more help, please provide some details of the code you have added and what isn't working for you.

right, I get it's a unique event which is what I used for the button styling, just wasn't sure what syntax is needed to add more events since I'm not familiar with how to write that code and separate them (I.e comma, semicolon, etc. I haven't implemented it yet but will paste the code in when I do.

Thanks for the reply.

Link to comment
  • 4 weeks later...
On 4/12/2022 at 1:13 PM, paul2009 said:

The ellipses is the unique reference for your eventbrite event, which is why I haven't shown it. To style all the buttons in the same way, simply add the class as I explained, and then refer to this class in your Custom CSS instead of referring to the ID. If you need more help, please provide some details of the code you have added and what isn't working for you.

 

Hey @paul2009,  thank you for the help so far! This is going to save me so much time. I noticed @lamdra hasn't come back with a specific example, and I have the same question they did. Examples are so helpful, so here are my details.

The Eventbrite event ID for my next upcoming event is 334618100747.*

 

I followed your directions by adding this to my site-wide custom CSS:

// eventbrite button styling
button.eventbrite {
    font-family: proxima-nova;
    font-size: 14px;
    font-weight: 500;
    font-style: uppercase;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #ffffff;
    background-color: #73998A;
    border-color: #73998A;
    padding: 20px;
    width: 100%;
    border: 2px;
}

 

Here is the embed code provided by Eventbrite for this event:

<!-- Noscript content for added SEO -->
<noscript><a href="https://www.eventbrite.com/e/wellstruck-roundtable-for-small-business-owners-tickets-334618100747" rel="noopener noreferrer" target="_blank">Buy Tickets on Eventbrite</a></noscript>
<!-- You can customize this button any way you like -->
<button id="eventbrite-widget-modal-trigger-334618100747" type="button">Buy Tickets</button>

<script src="https://www.eventbrite.com/static/widgets/eb_widgets.js"></script>

<script type="text/javascript">
    var exampleCallback = function() {
        console.log('Order complete!');
    };

    window.EBWidgets.createWidget({
        widgetType: 'checkout',
        eventId: '334618100747',
        modal: true,
        modalTriggerElementId: 'eventbrite-widget-modal-trigger-334618100747',
        onOrderComplete: exampleCallback
    });
</script>

 

Could you help me by showing me the proper syntax for applying the class to the button? Thank you!

 

*If anyone else is trying to find their event ID on Eventbrite, go visit your public event page and copy the numbers at the end of your URL tail. It's also included in Eventbrite's embed code after EventId as you can see above.

 

 

Edited by wellstruck
Link to comment
2 hours ago, wellstruck said:

Could you help me by showing me the proper syntax for applying the class to the button?

Sure.

Because you've chosen a classname of "eventbrite" for the CSS, you'll want to add this class to the HTML that creates the button. This means editing line 4 of your code, so that instead of this:

<button id="eventbrite-widget-modal-trigger-334618100747" type="button">Buy Tickets</button>

you have this:

<button id="eventbrite-widget-modal-trigger-334618100747" class="eventbrite" type="button">Buy Tickets</button>

The only difference is that I've added class="eventbrite".

I hope this helps.

Did this help? Please give feedback by clicking an icon below  ⬇️

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
  • 11 months later...

Can someone please help me change the background colour for the eventbrite widget that displays the whole event (not just the button). Code below

 

<div id="eventbrite-widget-container-622138792877"></div>

<script src="https://www.eventbrite.com.au/static/widgets/eb_widgets.js"></script>

<script type="text/javascript">
    var exampleCallback = function() {
        console.log('Order complete!');
    };

    window.EBWidgets.createWidget({
        // Required
        widgetType: 'checkout',
        eventId: '622138792877',
        iframeContainerId: 'eventbrite-widget-container-622138792877',

        // Optional
        iframeContainerHeight: 425,  // Widget height in pixels. Defaults to a minimum of 425px if not provided
        onOrderComplete: exampleCallback  // Method called when an order has successfully completed
    });
</script>

Link to comment
On 4/27/2023 at 2:05 PM, LouiseHampel said:

Can someone please help me change the background colour for the eventbrite widget that displays the whole event (not just the button). Code below

 

<div id="eventbrite-widget-container-622138792877"></div>

<script src="https://www.eventbrite.com.au/static/widgets/eb_widgets.js"></script>

<script type="text/javascript">
    var exampleCallback = function() {
        console.log('Order complete!');
    };

    window.EBWidgets.createWidget({
        // Required
        widgetType: 'checkout',
        eventId: '622138792877',
        iframeContainerId: 'eventbrite-widget-container-622138792877',

        // Optional
        iframeContainerHeight: 425,  // Widget height in pixels. Defaults to a minimum of 425px if not provided
        onOrderComplete: exampleCallback  // Method called when an order has successfully completed
    });
</script>

Can you share link to page where you added code? We can check easier

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.