Skip to content

Instantly share code, notes, and snippets.

View jillmugge's full-sized avatar

Jill jillmugge

View GitHub Profile
@jillmugge
jillmugge / wp-config.php
Last active December 7, 2018 15:19
wp-config.php
/* Place after define('WP-DBUG', false);*/
define('FORCE_SSL_ADMIN', true); //will force login thru SSL https://entire site: goto general settings add https://
//define('ALTERNATE_WP_CRON', true); //posts not getting published? redirect cron
//define('DISALLOW_FILE_EDIT', true); //will disable WP editor
//define('DISALLOW_FILE_MODS', true); //disables add/delete theme & plugins
define('WP_CASHE', true); //wp default cashe.
//define('WP_POST_REVISIONS', 4); //limits revisions false to turn off
//define('AUTOSAVE_INTERVAL', 240); //minutes
//define( 'WP_SITEURL', 'https://jmgmarketinggroup.com' ); //hard code into gen settings
//define( 'WP_HOME', 'https://jmgmarketinggroup.com' );
@jillmugge
jillmugge / Add Sales Reps to WooCommerce
Last active February 5, 2019 18:11
Add Sales Reps to WooCommerce
//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',
@jillmugge
jillmugge / WooCommerce
Created April 22, 2014 14:36
Enlarge Product Images for WooCommerce
ul.products img{
-webkit-transition:all .5s ease-out !important; /*Webkit: Scale down image to 0.8x original size*/
-moz-transition:all .5s ease-out !important; /*Mozilla scale version*/
-o-transition:all .5s ease-out !important; /*Opera scale version*/
transition:all .5s ease-out !important;
-webkit-backface-visibility: hidden;
}
img.attachment-shop_catalog.wp-post-image:hover {
-webkit-transform:scale(2); /*Webkit: Scale up image to 1.2x original size*/
@jillmugge
jillmugge / Builder
Created April 22, 2014 14:37
force a specific Builder layout for main shop page and individual product pages
function custom_filter_shop_layout( $layout_id ) {
if ( is_post_type_archive('product') || is_singular( 'product' ))
return '5229da61e6097';
return $layout_id;
}
add_filter( 'builder_filter_current_layout', 'custom_filter_shop_layout' );
@jillmugge
jillmugge / Auto Update
Created April 22, 2014 14:37
Auto Update WP 3.7
//add to function.php (plugin file)
//members chat 10/28/13 handout
add_filter('auto_update_plugin','__return_true');
@jillmugge
jillmugge / MCE
Created April 22, 2014 14:38
Add buttons to MCE
<?php
function add_more_buttons($buttons) {
$buttons[] = 'hr';
$buttons[] = 'del';
$buttons[] = 'sub';
$buttons[] = 'sup';
$buttons[] = 'fontselect';
$buttons[] = 'fontsizeselect';
$buttons[] = 'cleanup';
$buttons[] = 'styleselect';
@jillmugge
jillmugge / admin css
Created April 22, 2014 14:40
remove thank you for creating with WP in the admin css
<?php
/*
*Add this snipt to functions.php file. Also add a wp-admin.css file to the child theme.
*
*?
function load_jmg_wp_admin_style(){
wp_register_style( 'jmg_wp_admin_css', get_bloginfo('stylesheet_directory') . '/wp-admin.css', false, '1.0.0' );
wp_enqueue_style( 'jmg_wp_admin_css' );
}
add_action('admin_enqueue_scripts', 'load_jmg_wp_admin_style');
@jillmugge
jillmugge / local config file
Created April 22, 2014 14:42
local-config.php
if( file_exists( dirname( __FILE__) . '/local-config.php' ) ) {
include( direname( __FILE__ ) . '/local-config.php' );
define( 'WP_LOCAL_DEV', true );
} else {
deifne ('WP_LOCAL_DEV', false);
define ( 'DB_NAME', 'production_db' );
define ( 'DB_USER', 'prodcuction_user' );
define ( 'DB_PASSWORD', 'production_password' );
define ( 'DB_HOST', 'produciton_db_host' );
}
@jillmugge
jillmugge / Tblvd - copyright
Created April 22, 2014 14:43
Themeblvd - edit dynamic copyright year
@jillmugge
jillmugge / CSS Floats
Created April 22, 2014 14:44
Group Class for Floats
.group:before,
.group:after{
content:"";
display:table;
}
.group:after{
clear:both;
}
.group {
*zoom:1;