Skip to content

Instantly share code, notes, and snippets.

View DevinWalker's full-sized avatar
🌱
Coding for good

Devin Walker DevinWalker

🌱
Coding for good
View GitHub Profile
@DevinWalker
DevinWalker / Beanstalk_to_GitHub
Created October 9, 2015 17:19
Move Git Repository from Beanstalk to GitHub with full repository history
#Example moving the DPSG Global Library
# 1 Checkout the Beanstalk Repo
git clone --bare git@codeandtheory.beanstalkapp.com:/dpsg-global-library.git
# 2 Push into your desired GitHub repo. (Please note that you must create the github repo prior to this step)
git push --mirror git@github.com:codeandtheory/dpsg-global-library.git
@DevinWalker
DevinWalker / gist:6fb2783c05b46a2ba251
Created April 17, 2015 17:31
WordPress: Loop through Categories and Display Posts Within
<?php
/*
* Loop through Categories and Display Posts within
*/
$post_type = 'features';
// Get all the taxonomies for this post type
$taxonomies = get_object_taxonomies( array( 'post_type' => $post_type ) );
foreach( $taxonomies as $taxonomy ) :
@DevinWalker
DevinWalker / woocommerce-optimize-scripts.php
Last active January 8, 2024 13:24
Only load WooCommerce scripts on shop pages and checkout + cart
/**
* Optimize WooCommerce Scripts
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages.
*/
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 );
function child_manage_woocommerce_styles() {
//remove generator meta tag
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
@DevinWalker
DevinWalker / remove-rev-slider-metabox.php
Created May 14, 2014 20:32
This code removed the Revolution Slider metabox on pages, posts and CTPs
/**
* Remove Rev Slider Metabox
*/
if ( is_admin() ) {
function remove_revolution_slider_meta_boxes() {
remove_meta_box( 'mymetabox_revslider_0', 'page', 'normal' );
remove_meta_box( 'mymetabox_revslider_0', 'post', 'normal' );
remove_meta_box( 'mymetabox_revslider_0', 'YOUR_CUSTOM_POST_TYPE', 'normal' );
}
@DevinWalker
DevinWalker / gravity-forms_bootstrap
Last active November 28, 2023 20:35
Gravity Forms Twitter Bootstrap CSS Styles Turn OFF Gravity Forms CSS Turn On HTML5 See: http://roots.io/style-gravity-forms-with-bootstrap/
/* ------------------------------------
Gravity Forms
---------------------------------------*/
.gform_wrapper ul { padding-left: 0; list-style: none }
.gform_wrapper li { margin-bottom: 15px }
.gform_wrapper form { margin-bottom: 0 }
@DevinWalker
DevinWalker / wp-config.php
Created December 11, 2017 17:11 — forked from emgk/wp-config.php
WP Debug Configurations
define('WP_DEBUG', true);
define('SCRIPT_DEBUG',true);
if ( WP_DEBUG ) {
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );
@ini_set( 'log_errors', 'On' );
@ini_set( 'display_errors', 'Off' );
@ini_set( 'error_reporting', E_ALL );
@ini_set( 'error_log', 'php_error.log' );
@DevinWalker
DevinWalker / gravity-forms-strip-email-from-name-quotes.php
Last active February 1, 2022 14:14
For some odd reason Gravity Forms includes quotes in the "From" sender name. This is inconsistent with other mail senders so this removes the quotes in the "From Name" email headers.
/**
* Replace Quotes in Gravity Forms Email Headers
*
* For some odd reason Gravity Forms includes quotes in the "From" sender name. This is inconsistent with other mail senders so this removes the quotes.
*
* @param $email
* @param $message_format
* @param $notification
*
* @return mixed
@DevinWalker
DevinWalker / iterm2-solarized.md
Created January 7, 2022 22:57 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@DevinWalker
DevinWalker / content-product.php
Last active September 19, 2021 23:09
Correct WooCommerce hooks for Total theme template override: woocommerce/content-product.php
<?php
/**
* The template for displaying product content within loops.
*
* Override this template by copying it to yourtheme/woocommerce/content-product.php
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
*/
@DevinWalker
DevinWalker / setup-phpunit.sh
Created May 26, 2017 20:46 — forked from keesiemeijer/setup-phpunit.sh
Setup PHPUnit for use in the Local by Flywheel app
#!/usr/bin/env bash
# ===============================================================================
# Script to install PHPUnit in the Local by Flywheel Mac app
# These packages are installed
#
# PHPUnit, git, subversion, composer, curl and wget
#
# WordPress and the WP_UnitTestCase are installed in the /tmp directory
# The $WP_CORE_DIR and $WP_TESTS_DIR variables are added to the .bashrc file