Skip to content

Instantly share code, notes, and snippets.

Avatar

Geoff Graham geoffgraham

View GitHub Profile
@geoffgraham
geoffgraham / tribe-styles.css
Created Mar 17, 2020
Hide events in "Private" category when user is not logged into WordPress.
View tribe-styles.css
body:not(.logged-in) .tribe_events_cat-private {
display: none;
}
@geoffgraham
geoffgraham / tribe-styles.css
Last active Mar 17, 2020
Add "Canceled" label to events tagged "Canceled" in TEC list view
View tribe-styles.css
.tag-canceled .tribe-events-calendar-list__event-datetime span {
opacity: .5;
text-decoration: line-through;
}
.tag-canceled .tribe-events-calendar-list__event-datetime::before {
content: "Canceled";
color: #e64a31;
margin-right: .5rem;
}
@geoffgraham
geoffgraham / meta.html
Created Oct 30, 2017
Meta for Favicon / App Links
View meta.html
<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/android-icon-192x192.png">
View gist:26a6312c086d18dcd17a95fe8083f987
<form action="https://moderntribe.createsend.com/t/r/s/utktitu/" method="post" id="subForm">
<p>
<label for="fieldName">Name</label><br />
<input id="fieldName" name="cm-name" type="text" />
</p>
<p>
<label for="fieldEmail">Email</label><br />
<input id="fieldEmail" name="cm-utktitu-utktitu" type="email" required />
</p>
<p>
@geoffgraham
geoffgraham / mt-ce-force-timepicker-format.php
Created Apr 20, 2017
Community Events 4.4.4 // Force timepicker to use 24-hour time format
View mt-ce-force-timepicker-format.php
function ce_timepicker_24hr_fix() {
echo "
<script type='text/javascript'>
document.addEventListener( 'DOMContentLoaded', function() {
if ( 'function' !== typeof jQuery ) {
return;
}
setTimeout( function() {
jQuery( '.tribe-timepicker' ).timepicker( { 'timeFormat': 'H:i' } );
@geoffgraham
geoffgraham / single-event.php
Created Apr 12, 2017
The Events Calendar 4.4.5 // Single Event template override to show organizer beneath title
View single-event.php
<?php
/**
* Single Event Template
* A single event. This displays the event title, description, meta, and
* optionally, the Google map for the event.
*
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/single-event.php
*
* @package TribeEventsCalendar
* @version 4.3
@geoffgraham
geoffgraham / tickets.php
Created Apr 5, 2017
Event Tickets Plus 4.4.3 // tickets.php override
View tickets.php
<?php
/**
* Renders the WooCommerce tickets table/form
*
* Override this template in your own theme by creating a file at:
*
* [your-theme]/tribe-events/wootickets/tickets.php
*
* @version 4.3.5
*
@geoffgraham
geoffgraham / tribe-events-prepend-category-name.php
Created Mar 2, 2017
The Events Calendar 4.4.3 // Prepend category name to event title
View tribe-events-prepend-category-name.php
<?php
// Prepends category name(s) to to event titles
function tribe_events_title_include_cat ($title, $id) {
$separator = ' &raquo; '; // Separator between categories and title
$cats = get_the_terms($id, 'tribe_events_cat');
if (tribe_is_event($id) && $cats && !is_single()) {
$cat_titles = array();
@geoffgraham
geoffgraham / tribe-append-start-time-venue-to-event-title.php
Created Feb 17, 2017
The Events Calendar 4.4.2 // Append Start Time and Venue to Event Titles
View tribe-append-start-time-venue-to-event-title.php
<?php
// Appends start time and venue to event titles
function tribe_events_title_include_time_venue ($title, $id) {
$separator = ' &raquo; '; // Separator between categories and title
if (tribe_is_event($id) && !is_single()) {
$title = $title . $separator . tribe_get_start_time() . $separator . tribe_get_venue();
}
@geoffgraham
geoffgraham / organizer.php
Created Jan 24, 2017
The Events Calendar 4.4.0.1 // Change Organizer Link to Label
View organizer.php
<?php
/**
* Single Event Meta (Organizer) Template
*
* Override this template in your own theme by creating a file at:
* [your-theme]/tribe-events/modules/meta/organizer.php
*
* @package TribeEventsCalendar
* @version 4.4
*/
You can’t perform that action at this time.