SQS Toolbox
SQS Toolkit
Events

Add Extra Button on Events Summary Page

Let people register for your events faster by adding an additional button to your Event summaries page.

Thumbnail for Add Extra Button on Events Summary Page

Directions:

  1. Add a link to the excerpt of your event post.

  2. Paste the Styles into your Website » Website Tools » Custom CSS area.

  3. Paste the Javascript into your Site Footer Code Injection area.

 

Custom CSS

/**
* Second Button on
* Events Summary Page
* From Will-Myers.com
**/
.moved-excerpt-button{
  display: inline-block;
  margin-right: 17px;
}

 

Javascript
Place this in your Site Footer Code Injection area.

<!-- Second Button on Events Summary Page -->
<script>
  window.addEventListener('DOMContentLoaded', () => {
    const buttonType = 'primary'; // or secondary or teriary

    const eventItems = document.querySelectorAll('.eventlist-excerpt');
    eventItems.forEach(el => {
      const linksInExcerpt = el.querySelectorAll('p a');
      if (!linksInExcerpt.length) return;
      const lastLink = linksInExcerpt[linksInExcerpt.length - 1];
      lastLink.parentElement.classList.add('moved-excerpt-button');
      lastLink.classList.add('sqs-button-element--' + buttonType);
      el.insertAdjacentElement('afterend', lastLink.parentElement);
    });
  })
</script>
View Source

Last Updated: 4/30/2025