Enough people loved this gist, so it's now a Github repository!
⭐ Please use the "The Events Calendar Reset" on Github going forward. ⭐
| // install git-bash | |
| https://git-scm.com/downloads | |
| // Sign up with Github | |
| https://github.com/join |
Enough people loved this gist, so it's now a Github repository!
⭐ Please use the "The Events Calendar Reset" on Github going forward. ⭐
| /** | |
| * Scripts to run when in WordPress Gutenberg editor | |
| * | |
| * Unregister any block styles we don't want user to be able to select | |
| * or register our own custom block styles. | |
| */ | |
| wp.domReady( () => { | |
| // Unregister any block styles we don't want user to be able to select | |
| wp.blocks.unregisterBlockStyle( 'core/quote', 'default' ); | |
| wp.blocks.unregisterBlockStyle( 'core/quote', 'large' ); |
| <?php | |
| /** | |
| * Validate the extra register fields. | |
| * | |
| * @param WP_Error $validation_errors Errors. | |
| * @param string $username Current username. | |
| * @param string $email Current email. | |
| * | |
| * @return WP_Error | |
| */ |
| jQuery(".woocommerce-tabs li a").off("click"); | |
| jQuery(".woocommerce-tabs li a").click(function(e){ | |
| e.preventDefault(); | |
| jQuery(".woocommerce-tabs li").removeClass("active"); | |
| jQuery(this).parent().addClass("active"); | |
| jQuery(".woocommerce-Tabs-panel:visible").hide(); | |
| jQuery(".woocommerce-Tabs-panel:visible").hide(); | |
| jQuery(jQuery(this).attr("href")).show(); | |
| return false;}) |
| <?php | |
| // Prevent Yoast from changing Event Title Tags for Event Views (Month, List, Etc,) | |
| add_action( 'pre_get_posts', 'tribe_remove_wpseo_title_rewrite', 20 ); | |
| function tribe_remove_wpseo_title_rewrite() { | |
| if ( class_exists( 'Tribe__Events__Main' ) && class_exists( 'Tribe__Events__Pro__Main' ) ) { | |
| if( tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || tribe_is_map() || tribe_is_photo() || tribe_is_week() ) { | |
| $wpseo_front = WPSEO_Frontend::get_instance(); | |
| remove_filter( 'wp_title', array( $wpseo_front, 'title' ), 15 ); | |
| remove_filter( 'pre_get_document_title', array( $wpseo_front, 'title' ), 15 ); | |
| } |
| //* Add search to primary nav menu | |
| add_filter( 'wp_nav_menu_items', 'add_search_primary_nav_menu', 10, 2 ); | |
| function add_search_primary_nav_menu( $menu, stdClass $args ){ | |
| if ( 'primary' != $args->theme_location ) | |
| return $menu; | |
| if( genesis_get_option( 'nav_extras' ) ) | |
| return $menu; | |
| $menu .= sprintf( '<li class="custom-search">%s</li>', __( genesis_search_form( $echo ) ) ); | |
| return $menu; | |
| } |
| /* Remove product meta */ | |
| remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 ); |
| /********************* | |
| * Sensei Integration | |
| *********************/ | |
| /** | |
| * Declare that your theme now supports Sensei | |
| */ | |
| add_action( 'after_setup_theme', 'sensei_support' ); | |
| function sensei_support() { | |
| add_theme_support( 'sensei' ); |
| /* START Make the WooCommerce Cart Table Responsive for Mobile */ | |
| /* CSS published in http://www.jeremycarter.com.au/optimising-woocommerce-checkout-for-mobile/ */ | |
| @media screen and (max-width: 600px) { | |
| /* Force table to not be like tables anymore */ | |
| .woocommerce-page table.shop_table, | |
| .woocommerce-page table.shop_table thead, | |
| .woocommerce-page table.shop_table tbody, | |
| .woocommerce-page table.shop_table th, |