Hide Summary from printed attendees list in The Events Calendar

Dec 09, 2022 #the-events-calendar

The Events Calendar plugin offers an attendee list for site owners to manage attendees for a given event. The admin interface allows attendees to be search, sorted, and filtered based on multiple columns of data. Additionally, the attendee list can be printed, which formats the table for print, including a summary for the event at the top of the page.

This event summary can be removed from the print view of the attendee list with a simple snippet of code:

// Hide summary from printed attendees list
add_action('admin_head', function() {
  echo '<style>
    @media print {
	@tribe-attendees-summary {
        display: none!important;
        }
    }
  </style>';
});
By Kyle B. Johnson
Founding Member

Kyle Johnson is a contributor to WordPress core, WP-CLI, and Gutenberg. He speaks at WordCamps and Open Source conferences. As a collector of hobbies he is also a musician, furniture maker, amateur lock pick, avid reader, and wannabe book author.

Site Builders Guild - Tools and community for people who build websites.