Skip to content

Instantly share code, notes, and snippets.

View jmarchwinski's full-sized avatar

Jaime jmarchwinski

  • New York
View GitHub Profile
@jmarchwinski
jmarchwinski / text-wrap.css
Created September 15, 2017 21:47
Text Wrap Around Image
div.author.location {
float: right;
width: 68%;
margin-top: -150px;
}
#tribe-events .tribe-events-content p {
float: right;
margin-top: -80px;
}
@jmarchwinski
jmarchwinski / string-change.php
Created September 28, 2017 13:00
String Change
<?php
/*
* EXAMPLE OF CHANGING ANY TEXT (STRING) IN THE EVENTS CALENDAR
* See the codex to learn more about WP text domains:
* http://codex.wordpress.org/Translating_WordPress#Localization_Technology
* Example Tribe domains: 'tribe-events-calendar', 'tribe-events-calendar-pro'...
*/
function tribe_custom_theme_text ( $translation, $text, $domain ) {
@jmarchwinski
jmarchwinski / photo-view-reverse.php
Created November 1, 2017 11:18
Photo View Reverse Chronology
// Changes PHOTO VIEW listed event views to reverse chronological order
function tribe_past_reverse_chronological ($post_object) {
$past_ajax = (defined( 'DOING_AJAX' ) && DOING_AJAX && $_REQUEST['tribe_event_display'] === 'upcoming') ? true : false;
if(tribe_is_past() || tribe_is_photo() || tribe_is_upcoming() || $past_ajax) {
$post_object = array_reverse($post_object);
}
return $post_object;
}
add_filter('the_posts', 'tribe_past_reverse_chronological', 100);
@jmarchwinski
jmarchwinski / change-start-time.php
Created November 16, 2017 14:55
Change start time
add_filter( 'tribe_events_week_get_hours', 'filter_week_hours' );
function filter_week_hours( $hours ) {
$hour = 0;
foreach ( $hours as $key => $formatted_hour ) {
if ( $hour < 7 || $hour > 18 ) {
unset( $hours[ $hour ] );
}
@jmarchwinski
jmarchwinski / filter-bar-open.css
Created November 21, 2017 13:46
Filter Bar Open
.tribe_events_filter_item.closed div {
display: inherit !important;
}
.tribe-events-filters-horizontal .tribe-events-filter-group {
max-width: 100%;
width: 100%;
background: none;
border: none;
-webkit-box-shadow: none;
<?php
/*
* EXAMPLE OF CHANGING ANY TEXT (STRING) IN THE EVENTS CALENDAR
* See the codex to learn more about WP text domains:
* http://codex.wordpress.org/Translating_WordPress#Localization_Technology
* Example Tribe domains: 'tribe-events-calendar', 'tribe-events-calendar-pro'...
*/
function tribe_custom_theme_text ( $translation, $text, $domain ) {
@jmarchwinski
jmarchwinski / pro\widgets\modules\single-event.php
Last active September 26, 2019 12:59
Adds featured image to widgets
<?php
/**
* Single Event Template for Widgets
*
* This template is used to render single events for both the calendar and advanced
* list widgets, facilitating a common appearance for each as standard.
*
* You can override this template in your own theme by creating a file at
* [your-theme]/tribe-events/pro/widgets/modules/single-event.php
*
@jmarchwinski
jmarchwinski / functions.php
Created November 18, 2019 18:56
Filter Bar Category Additional Options
<?php
/**
* Customized version of the Category Filter that includes CSS classes for subcategories
* New filter available in WP-Admin > Events > Settings > Filters
*/
if ( class_exists( 'Tribe__Events__Filterbar__Filters__Category' ) ) {
class Tribe__Events__Filterbar__Filters__Category_Custom extends Tribe__Events__Filterbar__Filters__Category {
/**
* Flatten out the hierarchical list of event categories into a single list of values,
* applying formatting (non-breaking spaces) to help indicate the depth of each nested
add_filter( 'tribe_get_event_website_link_label', 'tribe_get_event_website_link_label_default' );
function tribe_get_event_website_link_label_default( $label ) {
if ( $label === tribe_get_event_website_url() ) {
$label = "Visit Website »";
return '<a href="'https://events.vtools.ieee.org/meetings/ical/0/90/asc/1/NEW%20HAMPSHIRE . tribe_get_event_website_url() . '">' . $label . '</a>';
}
return $label;