Skip to content

Instantly share code, notes, and snippets.

@geoffgraham
geoffgraham / index.html
Created July 27, 2013 22:03
A CodePen by Geoff Graham. Responsive CSS Bar Graph
<ul class="chart">
<li class="axis">
<div class="label">MVP</div>
<div class="label">All Star</div>
<div class="label">Slugger</div>
<div class="label">Rookie</div>
<div class="label">Triple A</div></li>
<li class="bar teal" style="height: 95%;" title="95">
<div class="percent">95<span>%</span></div>
<div class="skill">Karate</div></li>
@geoffgraham
geoffgraham / index.html
Created July 27, 2013 22:04
A CodePen by Geoff Graham. Style Heading Selections - Just playing off the sweetness over at http://responsive-nav.com/.
<h1>Nice selection, buddy</h1>
<p>Highlight the heading and let's see how this works as well as it does <a href="http://responsive-nav.com/">here</a>.</p>
@geoffgraham
geoffgraham / gist:08d4957f1417a9a60aaa
Last active September 23, 2023 13:45
Change date format for The Event Calendar single event view (M, D - D, Y
add_filter('tribe_events_event_schedule_details', 'custom_tribe_events_event_schedule_details');
function custom_tribe_events_event_schedule_details() {
if ( is_null( $event ) ) {
global $post;
$event = $post;
}
if ( is_numeric( $event ) )
$event = get_post( $event );
@geoffgraham
geoffgraham / gist:247cf5d7c7e618a60db9
Last active June 16, 2016 21:16
Exclude specific categories from The Events Calendar month and list views
// Removes categories "dance" and "concert" from list and month views
add_action( 'pre_get_posts', 'exclude_events_category' );
function exclude_events_category( $query ) {
if ( $query->query_vars['eventDisplay'] == 'list' && !is_tax(Tribe__Events__Main::TAXONOMY) || $query->query_vars['eventDisplay'] == 'month' && $query->query_vars['post_type'] == TribeEvents::POSTTYPE && !is_tax(Tribe__Events__Main::TAXONOMY) && empty( $query->query_vars['suppress_filters'] ) ) {
$query->set( 'tax_query', array(
@geoffgraham
geoffgraham / gist:cdc5ba8b4b7864aaf5c7
Last active September 25, 2020 08:56
The Events Calendar - Change Google Calendar and iCal button labels
<?php // Changes the text labels for Google Calendar and iCal buttons on a single event page
remove_action('tribe_events_single_event_after_the_content', array('TribeiCal', 'single_event_links'));
add_action('tribe_events_single_event_after_the_content', 'customized_tribe_single_event_links');
function customized_tribe_single_event_links() {
if (is_single() && post_password_required()) {
return;
}
echo '<div class="tribe-events-cal-links">';
@geoffgraham
geoffgraham / gist:b73bae41a346c0fc5af6
Created October 21, 2014 22:26
The Events Calendar - Hide country field from a single event meta box
.tribe-events-meta-group dd.location span.country-name {
position: absolute;
top: -10000px;
visibility: hidden;
}
@geoffgraham
geoffgraham / gist:d9f4428d09f70daa2ff4
Last active August 29, 2015 14:08
The Events Calendar - Order Events by Modified Date when on Home
add_action( 'pre_get_posts', 'order_by_modified' );
function order_by_modified( $query ) {
if ( $query->is_home() && $query->is_main_query() ) {
$query->set( 'orderby', 'modified' );
}
}
@geoffgraham
geoffgraham / gist:510e158ae56a77ed9e76
Last active April 25, 2016 22:01
Modern Tribe - Enqueue tribe bar styles and scripts for non-calendar pages.
function tribehome_enqueue_front_page_scripts() {
// Add these scripts to only the front page -- need to customize for your specific use
if( is_front_page() )
{
//Add the stylesheet into the header
wp_enqueue_style("tribe.homepage",WP_PLUGIN_URL."/the-events-calendar/resources/tribe-events-full.css");
wp_enqueue_style("tribe.homepage.date",WP_PLUGIN_URL."/tribe-homepage-search/css/datepicker.css");
@geoffgraham
geoffgraham / gist:a2f313966fba362aa066
Created October 28, 2014 21:15
Events Calendar 3.8.1 // Hook into 'tribe_events_inside_before_loop' action to display custom text for list view
add_action( 'tribe_events_inside_before_loop', 'output_custom_code' );
function output_custom_code() {
// Check if displaying month view
if( tribe_is_month() ) {
echo 'Your custom code to display.';
}
}
@geoffgraham
geoffgraham / gist:b43b23c9ac13a575a8da
Created October 31, 2014 17:17
Foursquare // Chaplains Form HTML
<form method="post" action="https://secure-q.net/Pages/Post" enctype="application/x-www-form-urlencoded" >
<input type="hidden" id="merchantid" name="merchantid" value="ICFGCQ" />
<input type="hidden" id="pageid" name="pageid" value="4504" />
<input type="hidden" id="Organization" name="Organization" value="" />
<input type="hidden" id="Prefix" name="Prefix" value="" />
<input type="hidden" id="FirstName" name="FirstName" value="" />
<input type="hidden" id="LastName" name="LastName" value="" />
<input type="hidden" id="Suffix" name="Suffix" value="" />
<input type="hidden" id="Address1" name="Address1" value="" />
<input type="hidden" id="City" name="City" value="" />