By editing the widget code, you can display more than one widget on a page in your marketing site. To display more than one widget, each widget must have a unique identifier. Once you have embedded the widgets to your site, you will need modify the widget code to create a unique identifier for the second widget and additional widgets.
Embedding more than one widget on a page
- Embed the widgets on your marketing page.
- Once the widgets have been added, view the code for the second widget.
- Within the code add -2 to the end of the div id and also to the elementId.
<script src="https://widgets.pike13.com/widget.js"></script>
<div id="pike13-widget-container-2"/>
<script>
Pike13Widget({
elementId: "pike13-widget-container-2",
type: "schedule",
useHashRoutes: false,
subdomain: "Gym",
date: {
start: 0,
end: 30,
},
style: {
businessColor: "#008ab4" - If you have third widget, modify the div id and elementId to include -3. For subsequent widgets, you can keep creating unique identifiers by adding -4, -5 etc.
- Once the div id and elementId has been updated, you will be able to display multiple widgets on one page.