Skip to content

Instantly share code, notes, and snippets.

View ejntaylor's full-sized avatar
🚢
Shipping

Elliot ejntaylor

🚢
Shipping
View GitHub Profile
@ejntaylor
ejntaylor / functions.php
Created May 12, 2015 20:40
ReOrder LayersWP Child Style Load Order
<?php
// Remove Layers added Child Styles
add_action( 'wp_enqueue_scripts', 'remove_default_layers_child_stylesheet', 20 );
@ejntaylor
ejntaylor / Products per row
Last active April 11, 2018 12:58
Upsells / Related Product Product Quantity and Columns
http://docs.woothemes.com/document/change-number-of-products-per-row/

Keybase proof

I hereby claim:

  • I am raisonon on github.
  • I am ejntaylor (https://keybase.io/ejntaylor) on keybase.
  • I have a public key ASAzxgSxZCJiGVOAnZsjnXcbOPso3bK3SjpWLcNt9Ljegwo

To claim this, I am signing this object:

@ejntaylor
ejntaylor / functions.php
Created December 2, 2017 12:15
Rename cart to bag
<?php
function woo_custom_change_cart_string($translated_text, $text, $domain) {
$translated_text = str_replace("cart", "bag", $translated_text);
$translated_text = str_replace("Cart", "Bag", $translated_text);
$translated_text = str_replace("View Cart", "View Bag", $translated_text);
<?php
function ss_settings_form( $atts = array() ) {
global $post;
// var_dump($atts);
/**
* Depending on your setup, check if the user has permissions to edit_posts
<?php
function ss_list_array() {
// Set Vars
$current_user = get_current_user();
$username = $current_user->user_login;
$post = get_the_ID();
<?php
// cmb2
// hook the function to the cmb2_init action
add_action( 'cmb2_init', 'cmb2_sample_metaboxes' );
// create the function that creates metaboxes and populates them with fields
function cmb2_sample_metaboxes() {
add_shortcode( 'ss-site-form', 'ss_frontend_form_shortcode' );
/**
* Shortcode to display a CMB2 form for a post ID.
* @param array $atts Shortcode attributes
* @return string Form HTML markup
*/
function ss_frontend_form_shortcode( $atts = array() ) {
global $post;
@ejntaylor
ejntaylor / functions.php
Created November 11, 2014 12:44
Get the icon image from the WordPress Plugin API
<?php
$bp_filetypes = array('128x128.png','128x128.jpg','256x256.png','256x256.jpg','logo.svg');
foreach ($bp_filetypes as $bp_filetype) {
$logo_item = $bp_filetype;
$url = 'http://ps.w.org/' . $pb_plugin_item[plugin_slug] . '/assets/icon-' . $logo_item;
//echo $url;
@ejntaylor
ejntaylor / functions.php
Last active January 3, 2016 09:09
Canvas navigation move to right
add_action( 'init', 'woo_custom_move_navigation', 10 );
function woo_custom_move_navigation () {
// Remove main nav from the woo_header_after hook
remove_action( 'woo_header_after','woo_nav', 10 );
// Add main nav to the woo_header_inside hook
add_action( 'woo_header_inside','woo_nav', 10 );
} // End woo_custom_move_navigation()