View kit-settings.txt
localhost,127.0.0.1.xip.io,mydomain.dev,dev.mydomain.com,mydomain.com
View hide-prod-cat-woo.php
<?php //<~ dont add me into functions.php
add_action( 'woocommerce_product_query', 'prefix_custom_pre_get_posts_query' );
/**
* Hide Product Cateories from targetted pages in WooCommerce
* @link https://gist.github.com/stuartduff/bd149e81d80291a16d4d3968e68eb9f8#file-wc-exclude-product-category-from-shop-page-php
*
*/
function prefix_custom_pre_get_posts_query( $q ) {
View woocustomer.php
<?php
// Ref - https://nicola.blog/2016/03/30/redirect-after-logging-in-based-on-the-user-role/
// add me to functions.php
add_filter( 'woocommerce_login_redirect', 'wc_custom_user_redirect', 10, 2 );
/**
* Redirect users to custom URL based on their role after login
*
* @param string $redirect
* @param object $user
View checkbox-metabox.php
<?php
/*
Plugin Name: Checkbox Meta
Plugin URI: http://wpbeaches.com/
Description: Checkbox Test
Author: Neil Gee
Version: 1.0.0
Author URI: http://wpbeaches.com
License: GPL-2.0+
View add_action.php
add_action('post_submitbox_misc_actions', createCustomField);
add_action('save_post', saveCustomField);
View emoji.php
<?php
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );
View logo.php
<?php
// When using a child theme
// Hard code logos width and height in the inline style sheet below
add_action('login_head', 'custom_login_logo');
// CUSTOM LOGIN LOGO, LINK AND IMAGE DESCRIPTION
function custom_login_logo() {
echo '<style type="text/css">
.login h1 a { background-image:url(' . get_stylesheet_directory_uri() . '/images/logo.png) !important; width: 260px; !important; height: 60px !important; background-size: 100% 100% !important; margin-bottom: 60px !important;}
</style>';
View slidetoggle-multi.js
jQuery(document).ready(function($){
// 4 links showing hiding 4 panels
// Links have class .show1 to .show4
// Panels have class .row1 to .row4 and also share a common .row class
// The .row class is called to close the inacticve panels with .slideup()
// The .toggleclass() is used on the link to change a pseudo icon to an open/close state
// For just a single iteration of .slideToggle() - just remove the .slideup() line.
View flexbox-woo-products.css
/* Flexbox on WooCommerce archive products */
.woocommerce .products ul,
.woocommerce ul.products {
display: flex;
flex-flow: row wrap;
}
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
display: flex;
View archive-testimonial.php
<?php
add_action ( 'get_header', 'tt_remove_post_info_archive' );
// Remove Post Info, Post Meta from CPT
function tt_remove_post_info_archive() {
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
}
add_action('genesis_before_loop','tt_cpt_change_all');