{"id":23228973,"url":"https://github.com/mrwweb/the-events-calendar-reset","last_synced_at":"2025-09-10T02:45:09.507Z","repository":{"id":166962008,"uuid":"642518443","full_name":"mrwweb/the-events-calendar-reset","owner":"mrwweb","description":"A set of tips, CSS resets, and PHP functions to make The Events Calendar work better on your website.","archived":false,"fork":false,"pushed_at":"2023-10-11T17:28:32.000Z","size":46,"stargazers_count":18,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-16T13:18:38.362Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrwweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-05-18T18:49:59.000Z","updated_at":"2024-10-28T16:09:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"3025fa38-300a-44d6-a654-d4888eaca070","html_url":"https://github.com/mrwweb/the-events-calendar-reset","commit_stats":null,"previous_names":["mrwweb/the-events-calendar-reset"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrwweb%2Fthe-events-calendar-reset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrwweb%2Fthe-events-calendar-reset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrwweb%2Fthe-events-calendar-reset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrwweb%2Fthe-events-calendar-reset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrwweb","download_url":"https://codeload.github.com/mrwweb/the-events-calendar-reset/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230359873,"owners_count":18214159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-19T01:15:46.879Z","updated_at":"2025-08-19T15:30:58.109Z","avatar_url":"https://github.com/mrwweb.png","language":"CSS","funding_links":["https://www.paypal.com/paypalme/rootwiley"],"categories":[],"sub_categories":[],"readme":"# The Events Calendar v2 Template Reset \u0026 Customization Guide\n\nVersion: 2.2.1!\n[Changelog](#changelog)\n\n[Feeback encouraged!](https://mrwweb.com/contact/)\n\n## Introduction\n\n[The Events Calendar](https://theeventscalendar.com) (TEC) is a very powerful WordPress plugin for managing events. However, the way its templates and CSS are implemented—especially the v2 templates—leave much to be desired.\n\nThis repository contains useful reset files and a checklist of changes I make on nearly every project that uses The Events Calendar. I wish it weren't so long!\n\n## Who Made This?\n\nI'm Mark Root-Wiley of [MRW Web Design](https://MRWweb.com). I build WordPress websites for nonprofits. Checkout my free resource site [Nonprofit WP](https://nonprofitwp.org) and my [free plugins](https://profiles.wordpress.org/mrwweb/#content-plugins).\n\n**If this saves you an hour and a bunch of frustration, consider [buying me a coffee or a beer](https://www.paypal.com/paypalme/rootwiley) to say thanks! 🍻☕**\n\n## Customizations Checklist\n\n### Styles\n\nThere are two complimentary stylesheets so that TEC inherits and uses more theme styles. This is especially powerful if you are using `/theme.json` to set colors, font sizes, and a [spacing scale](https://developer.wordpress.org/news/2023/03/everything-you-need-to-know-about-spacing-in-block-themes/).\n\n- [ ] Use `css/tec-remap-custom-properties.scss` to override a number of TEC defaults with WP/`theme.json` defaults\n  - [ ] Follow instructions in file header to review styles, customize additional properties, and delete what you won't be using\n- [ ] Use `css/tec-inherit-values.scss` reset stylesheet below to get rid of numerous hard-coded values and inherit more theme styles\n  - [ ] Optionally set CSS properties to match theme font sizes and colors\n- [ ] Add custom styles to blocks.\n  - (Optional) Reference [list of useful TEC styling selectors](\u003chttps://github.com/mrwweb/wordpress-block-editor-theme-support-starter/blob/master/third-party-blocks/the-events-calendar-front-end-blocks.css\u003e) as starting point (slightly outdated as of August 28, 2023).\n\n### Template Overrides\n\nTEC provides a powerful system to override various plugin templates like the page-level templates all the way down to a specific block. Most sites will need to customize multiple templates for best results.\n\n- [ ] Copy and customize `/tribe/events/v2/default-template.php` into `/{theme}/tribe/events/v2/`\n- [ ] Clean up one or both single event templates:\n  - Classic Editor Events: `/{theme}/tribe-events/single-event.php`\n  - Block Editor Events: `/{theme}/tribe/events/single-event-blocks.php`\n- [ ] Customize additional templates as needed. Recommended accessibility fixes to templates:\n  - [ ] `/{theme}/tribe/events/v2/list/event.php` - Datetime should follow the event's title heading for logical structure\n  - [ ] `/{theme}/tribe/events/v2/latest-past/event.php` - Datetime should follow the event's title heading for logical structure\n  - [ ] `/{theme}/tribe/events/blocks/event-datetime.php` - Don't use a Heading 2 for logical heading structure on single events\n  - [ ] `/{theme}/tribe/events/v2/list/event/feature-image.php` - Apply `aria-hidden=\"true\"` to featured image link since it's redundant with the event title link in list view\n\n### Optional Plugins\n\n- [ ] Fix a few things about event pages and [set a custom default block template](https://support.theeventscalendar.com/807454-Change-the-Default-Event-Template-in-Block-Editor) with mu-plugin in `mu-plugins/tec-customizations.php` in this repository\n  - Customize the default block for a new Event with the `tribe_events_editor_default_template` filter. See `/example-block-templates/` for examples of block templates of various complexity\n- [ ] Install [Post Type Archive Descriptions](https://wordpress.org/plugins/post-type-archive-descriptions/) for an editable area at the top of the main events page\n- [ ] Explore [additional TEC extensions](https://theeventscalendar.com/?s=\u0026submit=\u0026match%5Btribe_ecp_product_links%5D%5B%5D=the-events-calendar\u0026post_type%5B%5D=tribe-extensions) for customizations (e.g., hide past events, [\"tweaks\" plugin](https://theeventscalendar.com/extensions/the-events-calendar-tweaks/), etc.)\n\n## Useful v2 Design Filters\n\nIn TEC v2 templates, you can use the `tribe_template_pre_html` filter to hide specific template parts. For example, to hide the \"Read More\" links in list views:\n\n```php\n/* Hide \"Read More\" links */\nadd_filter( 'tribe_template_pre_html:events/v2/components/read-more', '__return_false' );\n```\n\nYou can also helpfully add content before or after any template part using `tribe_template_before_include` and `tribe_template_after_include`. For example:\n\n```php\n/* Add \"Hello World\" after the \"Views\" selector in the event bar */\nadd_action( 'tribe_template_before_include:events/v2/components/events-bar/views', function( $file, $name, $template ) {\n  echo 'Hello World';\n}, 10, 3 );\n```\n\n## Helpful Extensions\n\nThere are a number of [free \"extensions\"](https://theeventscalendar.com/extensions/) that make small tweaks to The Events Calendar. A few of these are even redundant with changes in the mu-plugin for this repo. Here are the most useful:\n\n- [Template Inspector](https://theeventscalendar.com/extensions/calendar-template-inspector/) - Great for use in finding which filters you need from the prior section)\n- [Make venue name link to venue URL](https://theeventscalendar.com/extensions/make-venue-names-link-to-the-venue-website-url/)\n- [Make organizer name link to organizer URL](https://theeventscalendar.com/extensions/make-organizer-names-link-to-organizer-website-urls/)\n\n### References\n\n- [Using Template Filters and Actions on TheEventsCalendar.com](https://theeventscalendar.com/knowledgebase/k/using-template-filters-and-actions/)\n- [Template Hooks on TheEventsCalendar.com](https://theeventscalendar.com/knowledgebase/k/template-hooks/)\n\n## Changelog\n\n### 2.2.1 (March 14, 2025)\n\n- Rename, simplify, _and_ improve the is_tec_view() function (formerly is_tribe_view())\n- Add note about free extensions\n- Explicit namespaces in mu-plugin\n\n### 2.2.0 (January 30 - February 4, 2025)\n\n- Add snippet in mu-plugin to remove AJAX navigation functions in TEC\n- Add example of using a Block Pattern for the default Event post template\n- Improve event page archive titles\n- Add some new selectors to reset padding and inherit values\n- Improve reset / inheritance specifically for event search bar\n\n### 2.1.0 (October 5, 2023)\n\n- Better defaults and cleaner styles for Datetime, Price, Venue, and Organizer blocks\n- Style notices with existing TEC custom properties that aren't used for some reason\n- Remove SASS nesting so this can be used as plain CSS if desired\n- Remove `post_tag` taxonomy from events and don't know tribe_events posts in Tag archives\n- Add new custom properties in attempt to prevent \"flash of TEC blue\" links and buttons\n- Change the organizer link text to the organizer's name\n- Ensure Subscribe button menu appears above other stuff\n\n### 2.0.2 (June 7, 2023)\n\n- New function in mu-plugin to replace wrapping `section` with a `div` for better semantics\n- Move custom properties in `_tec-inherit-values.css` to the `body` instead of `:root` so they have access to `theme.json` values set on `body`\n- Make sure the datetime block children inherit `font-size` from the body (or block parent)\n- Replace hard-coded namespace with `__NAMESPACE__` to avoid problem when changing namespace\n- Hide top border and padding above venue blog and event paging\n- Remove checklist item for old `default-template.php` file that is no longer included in the plugin\n\n### 2.0.1 (May 18, 2023)\n\n- This is now a git repository rather than a gist!\n- Rename css files for clarity\n- Provide fallbacks for custom properties in `tec-inherit-values.css`\n- Split examples into separate files in new examples folder\n- Add `CONTRIBUTING.md`\n\n### 2.0.0 (May 02, 2023)\n\n- Added new `_tec-reset-variables.scss` file for better style reset coverage and more stuff working \"out of the box\".\n- Removed some rules from `_tec-reset-styles.scss` that are no longer necessary due to new custom property definitions.\n- Add some more useful snippets to the mu-plugin (hide recent past events, show past events in reverse chronological order)\n- Add absolute position to export events drop-down so it doesn't reflow the page\n- Add \\MRW\\TEC\\is_tribe_view() function to detect when a TEC page is active (great for enqueueing custom styles!)\n- Fix: Put mobile-specific styles for event datetime into media query\n- Remove some dead highlighting styles\n- Remove snippet to add post type archive description and just recommend [Post Type Archive Descriptions plugin](https://wordpress.org/plugins/post-type-archive-descriptions/) more obviously\n- Remove link to \"Remove Export Links\" TEC add-on which is no longer available. Add link to extensions page instead\n- Remove some recommended accessibility template fixes that have been [integrated into the plugin](https://github.com/the-events-calendar/the-events-calendar/pull/3762)!\n\n### 1.5.0 (August 05, 2022)\n\n- Remove font-family now that there's a customizer setting for it\n\n### 1.4.2 (May 03, 2022)\n\n- Attempt to improve subscribe button style overrides dealing with weird focus and hover behaviors. Absolute position dropdown to avoid layout jank\n\n### 1.4.1 (February 9, 2022)\n\n- Improvements to subscribe button overrides to make them more likely to win over unwanted theme styles\n\n### 1.4.0 (January 19, 2022)\n\n- Fix featured event styles in month view\n- Add styles to override subscribe button styles\n- New suggestion to hide featured image from assistive technology in list views\n- Add equivalent template changes to `/latest-past/` templates to match `/list/` changes where applicable\n\n### 1.3.0 (August 23, 2021)\n\n- Add new selectors for heading styles and links on the new single event templates to match other override styles (fonts, underlining behavior, etc.)\n- Increase specificity of `.tribe-common-c-btn` selectors in order to override messed up settings in plugin and ensure the search bar button is the correct color\n- Remove filter that hid the back link on the single template. Does not work in v2 single events.\n\n### 1.2.0 (June 18, 2021)\n\n- Add new selectors to inherit font styles from the theme\n- Add editor selectors to try to style blocks closer to front-end. Results will vary.\n- Bug fix for TEC 5.7.0 template_include filter\n\n### 1.1.0 (April 20, 2021)\n\n- Add `/v2/` to path of `tribe_template_before_include` filter to fix bug in TEC 5.5.\n- Remove errant SASS variable in style resets\n- Fix missing accent customization for Featured Styles in list view. Adds new `--tec-accent-color` variable that defaults to `--tec-link-color`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrwweb%2Fthe-events-calendar-reset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrwweb%2Fthe-events-calendar-reset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrwweb%2Fthe-events-calendar-reset/lists"}