Skip to content

Instantly share code, notes, and snippets.

View gspice's full-sized avatar

Ginger Coolidge gspice

  • GSC Solutions LLC
  • Lincoln City, Oregon
View GitHub Profile
@gspice
gspice / 1.php
Created April 4, 2019 20:33 — forked from amdrew/1.php
AffiliateWP - Send the affiliate registration admin email to different email address, or multiple email addresses.
<?php
/**
* Send admin notification to a different email address
*/
function affwp_custom_registration_admin_email( $email ) {
// add the email here
$email = 'email@yourdomain.com';
return $email;
@gspice
gspice / gist:f90fc70372a74a14fddaabbfcba64d81
Created March 12, 2019 20:13 — forked from pippinsplugins/gist:d973776836ab984aea06
Sets an affiliate user's role to a specific role when being added as an affiliate
<?php
/*
* Plugin name: Affiliate role on registration
*/
function pw_affwp_set_role_on_registration( $affiliate_id = 0 ) {
$user_id = affwp_get_affiliate_user_id( $affiliate_id );
$user = new WP_User( $user_id );
$user->add_role( 'affiliate' );
@gspice
gspice / affwp-pms-restrict-referral.php
Created November 8, 2018 17:34 — forked from tubiz/affwp-pms-restrict-referral.php
Allows you to restrict referral creation to specific PMS subscription plans
<?php
/**
* Plugin Name: AffiliateWP - Restrict Referral Creation To Specific PMS Subscription Plans
* Plugin URI: http://affiliatewp.com
* Description: Allows you to restrict referral creation to specific PMS subscription plans
* Author: Tunbosun Ayinla, tubiz
* Author URI: https://bosun.me
* Version: 1.0
*/
@gspice
gspice / reposition-primary-nav-to-header.php
Created March 9, 2018 23:49
Move primary navigation up to the header
//* Reposition the primary navigation menu
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_header', 'genesis_do_nav', 12 );
@gspice
gspice / replace-widget-element.php
Last active September 18, 2017 04:52
Add this code snippet to your front-page.php file, at the bottom of the utility_pro_homepage_setup() function to swap out any h4 headers for h2.
// Hat tip to Gary Jones (@GaryJ) for providing the explanation
// on what was happening and the code on how to change it.
add_filter( 'genesis_markup_entry-title_open', 'gmj_replace_widget_element' );
add_filter( 'genesis_markup_widget-entry-title_close', 'gmj_replace_widget_element' );
function gmj_replace_widget_element( $string ) {
return str_replace( 'h4', 'h2', $string );
}
@gspice
gspice / home-featured-post-amplified.css
Last active September 18, 2017 04:53
Styling for adding the Genesis Featured Widget Amplified plugin to Utility Pro 1.3.x (personal license)
/* Home Featured Post widget -
using Genesis Featured Widget Amplified
--------------------------------------------- */
.home-featured-posts .featuredpost {
clear: both;
}
.home-featured-posts .featuredpost .widgettitle {
border-top: 1px solid #1c1c1c;
background-color: #fff;
@gspice
gspice / home-featured-post-amplified.scss
Last active September 18, 2017 04:53
Styling for adding the Genesis Featured Widget Amplified plugin to Utility Pro 1.3.x (developer license)
/* Home Featured Post widget -
using Genesis Featured Widget Amplified plugin
--------------------------------------------- */
.home-featured-posts .featuredpost {
clear: both;
}
.home-featured-posts .featuredpost .widgettitle {
border-top: 1px solid lighten($black, 11);
background-color: $white;
@gspice
gspice / home-featured-post-widget.css
Last active September 18, 2017 04:53
Styling for adding the Genesis Featured Posts widget to Utility Pro 1.3.x (personal license)
*/
/* Home Featured Post widget -
using default Genesis Featured Posts widget
--------------------------------------------- */
.home-featured-posts .featured-content {
clear: both;
}
.home-featured-posts .featured-content .widgettitle {
border-top: 1px solid #1c1c1c;
@gspice
gspice / home-featured-post-widget.scss
Last active September 18, 2017 04:54
Styling for adding the Genesis Featured Posts widget to Utility Pro 1.3.x (developer license)
/* Home Featured Post widget -
using default Genesis Featured Posts widget
--------------------------------------------- */
.home-featured-posts .featured-content {
clear: both;
}
.home-featured-posts .featured-content .widgettitle {
border-top: 1px solid lighten($black, 11);
background-color: $white;
@gspice
gspice / _header-scss
Created March 6, 2017 00:41 — forked from jdelia/_header-scss
Adding SVG Logo to Utility Pro theme
.header-image .site-title a {
background: url(images/logo.svg) center center no-repeat;
float: left;
min-height: 60px;
width: 100%;
@include media($medium-screen-up) {
background-position: left center;
}
}