Skip to content

Instantly share code, notes, and snippets.

View amberhinds's full-sized avatar

Amber Hinds amberhinds

View GitHub Profile
@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 / 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 / candidate-import.php
Created October 4, 2018 20:11
This is an example of a file that creates new posts in a custom post type from the Eventbrite Attendee API
<?php
function candidate_import($continuation, $event_id, $event_name, $token){
$log;
$log .= 'Event: '.$event_name.'<br />';
//check if API call should be paginated and if so get the continuation key
if(empty($continuation)){
//first page call
@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 / home.php
Last active January 30, 2018 18:38
Tour Stops Query
// Tour Stops Section
if ($tour_stops) {
?>
<div id="tour-stops" class="tour-stops-sctn">
<div class="wrap">
<h2 class="tour-title">Tour Cities</h2>
<div class="tour-stops-upcoming">
<h3>Upcoming Events<h3>
<?php
@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/
@amberhinds
amberhinds / style.css
Created June 5, 2017 18:53
CSS Modifications for Fort Collins Pain Relief
body.colors-dark,
.colors-dark button,
.colors-dark input,
.colors-dark select,
.colors-dark textarea,
.colors-dark h3,
.colors-dark h4,
.colors-dark h6,
.colors-dark label,
.colors-dark .entry-title a,
@amberhinds
amberhinds / page-template.php
Created September 19, 2016 17:29
Add Woocommerce lightbox scripts on other parts of the site (put on specific page templates or in functions.php)
<?php
add_action( 'wp_enqueue_scripts', 'frontend_scripts_include_lightbox' );
function frontend_scripts_include_lightbox() {
global $woocommerce;
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
$lightbox_en = get_option( 'woocommerce_enable_lightbox' ) == 'yes' ? true : false;
@amberhinds
amberhinds / shortcodes.php
Last active September 13, 2016 08:20
speakers shortcode
<?php
if (!function_exists('wpt_speakers')) {
function wpt_speakers( $atts, $content = null ) {
extract(shortcode_atts(array(
'event'=> '',
'class' => '',
), $atts));
$t = get_term_by( 'slug', $levelsp, 'levelsp' );
$out="</div><div class='row-fluid speaker-level'>".do_shortcode('[title-bordered]'.strtoupper($t->name).'[/title-bordered]')."</div><div class='row-fluid'>";