Skip to content

Instantly share code, notes, and snippets.

View harperdesignco's full-sized avatar

Ashley Harper harperdesignco

View GitHub Profile
@mike-pete
mike-pete / Step 0 - Prep
Last active June 8, 2022 22:26
Git-Bash Cheatsheet
// install git-bash
https://git-scm.com/downloads
// Sign up with Github
https://github.com/join
@mrwweb
mrwweb / readme.md
Last active September 27, 2024 22:29
The Events Calendar v2 Template Reset & Customizations - Now on Github
@jnicol
jnicol / block-editor-scripts.js
Last active January 18, 2024 16:00
Register/unregister WordPress Gutenberg block styles
/**
* 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' );
@claudiosanches
claudiosanches / functions.php
Created November 8, 2016 14:13
WooCommerce - Validating new "My account" registration fields
<?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
*/
@andrea-sdl
andrea-sdl / disable-scrolling-wc-tabs.js
Created November 8, 2016 05:52
disable scrolling on woocommerce-tabs
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;})
@geoffgraham
geoffgraham / tec-yoast-remove-page-title.php
Last active January 27, 2018 19:20
The Events Calendar - Yoast SEO - Prevent Yoast from changing Event Title Tags for Event Views (Month, List, Etc.)
<?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 );
}
@ryantownley
ryantownley / functions.php
Created April 14, 2016 19:10
Add search to primary menu in Genesis
//* 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;
}
@zstepek
zstepek / mightyswarm_wc_remove_product_meta.php
Last active May 7, 2024 14:42
Remove product meta (SKU, tags, etc) from WooCommerce single product pages.
/* Remove product meta */
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
@woogist
woogist / genesis-functions.php
Last active December 20, 2017 01:51
The code in below will integrate Sensei with the Genesis theme framework from Studio Press. Add the code below into your themes functions.php file.
/*********************
* Sensei Integration
*********************/
/**
* Declare that your theme now supports Sensei
*/
add_action( 'after_setup_theme', 'sensei_support' );
function sensei_support() {
add_theme_support( 'sensei' );
@catchthemes
catchthemes / woocommerce.css
Created September 22, 2014 14:06
Make the WooCommerce Cart Table Responsive for Mobile Devices
/* 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,