This file contains hidden or 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 | |
/** | |
* WordPress Plugin Isolation helper | |
* This helps your plugin/theme to have isolated webpages, keeping only your organized prefixed hooks. | |
* @package Hashtagg | |
* @subpackage Base | |
* @author Klipolis | |
* @copyright 2014 Klipolis | |
* @since 0.1.0 | |
* @version 0.1.0 |
This file contains hidden or 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 to funtctions.php file | |
//Adding Sales reps to the check out | |
add_action('woocommerce_after_order_notes', 'jmg_custom_checkout_field'); | |
function jmg_custom_checkout_field( $checkout ) { | |
echo '<div id="my_custom_checkout_field"><h2>'.__('Who Is Your EdiPure Sales Rep?').'</h2>'; | |
woocommerce_form_field( 'edipure_reps', array( | |
'type' => 'select', |
This file contains hidden or 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 | |
//* Do NOT include the opening php tag | |
//* Enqueue Animate.CSS and WOW.js | |
add_action( 'wp_enqueue_scripts', 'sk_enqueue_scripts' ); | |
function sk_enqueue_scripts() { | |
wp_enqueue_style( 'animate', get_stylesheet_directory_uri() . '/css/animate.min.css' ); | |
wp_enqueue_script( 'wow', get_stylesheet_directory_uri() . '/js/wow.min.js', array(), '', true ); |
This file contains hidden or 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
/** | |
* World's simplest express server | |
* - used to serve index.html from /public | |
*/ | |
var express = require('express'); | |
var serveStatic = require('serve-static'); | |
var app = express(); | |
app.use(serveStatic(__dirname + '/public')); |
This file contains hidden or 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
# Terminal Cheat Sheet | |
pwd # print working directory | |
ls # list files in directory | |
cd # change directory | |
~ # home directory | |
.. # up one directory | |
- # previous working directory | |
help # get help | |
-h # get help |
This file contains hidden or 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 /* Don't include this line if your child theme functions.php already includes it */ | |
function my_et_divi_output_content_wrapper_end() { | |
echo '</div> <!-- #left-area -->'; | |
if ( | |
( is_product() && 'et_full_width_page' !== get_post_meta( get_the_ID(), '_et_pb_page_layout', true ) ) | |
|| | |
( ( is_shop() || is_product_category() || is_product_tag() ) && 'et_full_width_page' !== et_get_option( 'divi_shop_page_sidebar', 'et_right_sidebar' ) ) | |
) { | |
dynamic_sidebar( 'eCommerce Sidebar' ); |
This file contains hidden or 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
/** ==================================================================================== | |
* Functions file | |
==================================================================================== **/ | |
function yourthemeprefix_yourcpt_metabox_register() { | |
$prefix = '_cmb_'; |
This file contains hidden or 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
/* | |
* Load More for Masonry modification | |
* | |
* Full post: | |
* http://www.billerickson.net/infinite-scroll-in-wordpress/ | |
* | |
*/ | |
jQuery(function($){ |
This file contains hidden or 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 | |
/*======================================================================== | |
Filter wp_list_categories to add new attribute | |
========================================================================*/ | |
add_filter('wp_list_categories','moons_ajax_onclick'); | |
function moons_ajax_onclick($output){ | |
//if (is_post_type_archive('crew')) { // localize this filter if needed | |
//if not using a CPT then change get_terms to get_categories |
This file contains hidden or 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
"use strict"; | |
// Load plugins | |
const autoprefixer = require("autoprefixer"); | |
const browsersync = require("browser-sync").create(); | |
const cp = require("child_process"); | |
const cssnano = require("cssnano"); | |
const del = require("del"); | |
const eslint = require("gulp-eslint"); | |
const gulp = require("gulp"); |