Skip to content

Instantly share code, notes, and snippets.

View amberhinds's full-sized avatar

Amber Hinds amberhinds

View GitHub Profile
@amberhinds
amberhinds / header.php
Created January 8, 2019 22:15
Track tel: & mailto: link clicks as goals in Google Analytics - passes events to corresponding Analytics goals
<script type='text/javascript'>
jQuery(function($){
// mailto function
$('a[href^="mailto:"]').click(function(){
ga('send','event','mailto','click','email clicked');
return true;
});
});
jQuery(function($){
@amberhinds
amberhinds / shortcodes.php
Created October 4, 2018 03:33
Display upcoming events from meetup in a shortcode
<?php
/**
* Shortcodes
*
* @package CoreFunctionality
* @author Bill Erickson
* @since 1.0.0
* @license GPL-2.0+
**/
@amberhinds
amberhinds / rwc-base.js
Created August 3, 2020 18:04
Base JS file from the Workforce Solutions Portal; includes GP Nested Forms Accessibility Fixes
/**
* RWC Base entry point.
*
* @package RWC Base JS
* @author Road Warrior Creative
* @license GPL-2.0-or-later
*/
var rwcBase = ( function( $ ) {
'use strict';
@amberhinds
amberhinds / function.php
Created July 6, 2020 14:28
hide category from UAG post grid
// Remove Featured Provider posts on blog grid on home page
add_filter( 'uagb_post_query_args_grid', function( $args ){
global $post;
if ( isset( $post ) && isset( $post->ID ) && 1757 === $post->ID ) {
$args['category__not_in'] = array( 2276 );
}
return $args;
} );
/**
* This script adds the accessibility-ready responsive menus Genesis Framework child themes.
*
* @author StudioPress
* @link https://github.com/copyblogger/responsive-menus
* @version 1.1.3
* @license GPL-3.0-or-later
*/
( function ( document, $, undefined ) {
@amberhinds
amberhinds / Style.css
Created May 10, 2019 14:36
Genesis Mega Menu
@media only screen and (min-width: 1024px) {
.genesis-responsive-menu .wrap {
position: relative;
}
/* the mega menu */
.mega-menu > .sub-menu {
background-color: #fff;
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
@amberhinds
amberhinds / food-blogger-categories.php
Created March 29, 2019 15:13
Adds food/recipe related taxonomies to blog posts
// Create meal type taxonomy
add_action( 'init', 'rwc_mealtype_tax' );
function rwc_mealtype_tax() {
$labels = array(
'name' => _x( 'Meal Types', 'taxonomy general name' ),
'singular_name' => _x( 'Meal Type', 'taxonomy singular name' ),
'search_items' => __( 'Search Meal Types' ),
'all_items' => __( 'All Meal Types' ),
'parent_item' => __( 'Parent Meal Type' ),
'parent_item_colon' => __( 'Parent Meal Type:' ),
@amberhinds
amberhinds / style.css
Created January 23, 2019 05:48
Lean Startup Co after post widget CSS
.single .after-post {
background-color: #28d180;
-webkit-box-shadow: 6px 6px 0px 2px rgba(0,0,0,0.75);
-moz-box-shadow: 6px 6px 0px 2px rgba(0,0,0,0.75);
box-shadow: 6px 6px 0px 2px rgba(0,0,0,0.75);
}
.single .after-post .widget {
color: #000;
padding: 20px;
@amberhinds
amberhinds / Style.css
Created January 14, 2019 17:08
Genesis accessibility functions for reference
/* ## Screen Reader Text
--------------------------------------------- */
.screen-reader-text,
.screen-reader-text span,
.screen-reader-shortcut {
position: absolute !important;
clip: rect(0, 0, 0, 0);
height: 1px;
width: 1px;
@amberhinds
amberhinds / front-page.php
Created June 26, 2017 16:01
Genesis Flexible widgets - How Altitude pro sets up the home page widgets
<?php
/**
* Altitude Pro.
*
* This file adds the front page to the Altitude Pro Theme.
*
* @package Altitude
* @author StudioPress
* @license GPL-2.0+
* @link http://my.studiopress.com/themes/altitude/