Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Last active September 29, 2021 10:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save joshfeck/ad9cfe46a8d753243a3cd857a78e7a15 to your computer and use it in GitHub Desktop.
Save joshfeck/ad9cfe46a8d753243a3cd857a78e7a15 to your computer and use it in GitHub Desktop.
Printer friendly styles for the Event Espresso 4 events calendar's iframe. Add the calendar-print-styles.css file to your child theme (top level).
@media screen {
html {
width: 8.5in;
}
body,
#espresso_calendar .fc-event-title {
font: 9pt/1.5 Arial, sans-serif;
}
}
@media print {
html {
width: 8.5in;
}
body,
#espresso_calendar .fc-event-title {
font: 9pt/1.5 Arial, sans-serif;
}
.fc-event {
background: #fff !important;
color: #000 !important;
}
.fc-button,
#espresso-category-legend,
.ee-filter-form {
display: none;
}
}
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter('FHEE__CalendarIframe__display__css', 'add_printer_friendly_calendar_styles', 11, 2);
function add_printer_friendly_calendar_styles(array $stylesheets, $object) {
$stylesheets['calendar_print_styles'] = get_stylesheet_directory_uri() . DS . 'calendar-print-styles.css';
return $stylesheets;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment