View vanilla.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import delegate from 'delegate'; | |
const el = { | |
siteHeader: document.querySelector('.site-header'), | |
}; | |
/** | |
* @function toggleMenu | |
* @description Toggle the menu open and closed | |
*/ |
View gist:ba9b617afdbdb3867159
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'tribe_event_label_singular', 'event_display_name' ); | |
function event_display_name() { | |
return 'XXXX'; | |
} | |
add_filter( 'tribe_event_label_plural', 'event_display_name_plural' ); | |
function event_display_name_plural() { | |
return 'XXXXs'; | |
} |
View gist:ffe7c737b73e5d581bad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dequeue_tribe_styles() { | |
// Dequeue events calendar stylesheets | |
wp_dequeue_style( 'tribe-events-full-calendar-style' ); | |
wp_dequeue_style( 'tribe-events-calendar-style' ); | |
wp_dequeue_style( 'tribe-events-calendar-full-mobile-style' ); | |
wp_dequeue_style( 'tribe-events-calendar-mobile-style' ); | |
wp_dequeue_style( 'tribe-events-full-pro-calendar-style' ); | |
wp_dequeue_style( 'tribe-events-calendar-pro-style' ); | |
wp_dequeue_style( 'tribe-events-calendar-full-pro-mobile-style' ); |
View gist:6875eb645a28df2a6db2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Check if page is direct child | |
function is_child( $page_id ) { | |
global $post; | |
if( is_page() && ($post->post_parent != '') ) { | |
return true; | |
} else { | |
return false; | |
} | |
} |
View gist:b5cd24e28819181b5f7b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wp_head', 'community_add_css' ); | |
function community_add_css() { | |
if ( tribe_is_community_edit_event_page() || tribe_is_community_my_events_page() ) { | |
?> | |
<style> | |
YOUR CSS STYLES GO HERE | |
</style> | |
<?php | |
} | |
} |
View gist:a754cbffa3c37b4a8c30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function custom_widget_featured_image() { | |
global $post; | |
echo tribe_event_featured_image( $post->ID, 'thumbnail' ); | |
} | |
add_action( 'tribe_events_list_widget_before_the_event_title', 'custom_widget_featured_image' ); |
View gist:7bc941f32f1abdb1c241
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'tribe_events_inside_before_loop', 'output_custom_code' ); | |
function output_custom_code() { | |
//Check if displaying list view | |
if( tribe_is_upcoming() ) { | |
echo 'Your custom code to display.'; | |
} | |
} |
View gist:b247169a4f124fa6ea7c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Retrieve venues that match query criteria | |
$args = array( | |
'nopaging' => true, | |
'post_type'=>'tribe_venue', | |
//Only query venues in specific locations | |
'meta_query' => array( | |
'relation' => 'AND', | |
//Specific City | |
array( |
View gist:75fecbc6209538b1daf2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'tribe_events_event_schedule_details_formatting', 'remove_end_time', 10, 2); | |
function remove_end_time( $formatting_details ) { | |
$formatting_details['show_end_time'] = 0; | |
return $formatting_details; | |
} |
View gist:472fbe0c96e209d2bf0d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'tribe_community_events_event_categories', 'hide_category_for_non_admins', 10, 2); | |
function hide_category_for_non_admins( $categories ) { | |
//Array of Category slugs to hide for non-admins | |
$categories_to_hide = array( 'concert', 'convention' ); | |
//If user is not admin | |
if( !current_user_can( 'manage_options' ) ) { | |
foreach( $categories as $key => $single_cat ) { |
NewerOlder