Skip to content

Instantly share code, notes, and snippets.

View spigotdesign's full-sized avatar

Bryan Hoffman spigotdesign

View GitHub Profile
@spigotdesign
spigotdesign / user-profile-picture.php
Last active September 26, 2022 04:38
Add WordPress image uploader to user profile.
/*
* Add custom user profile information
*
*/
add_action( 'show_user_profile', 'my_show_extra_profile_fields' );
add_action( 'edit_user_profile', 'my_show_extra_profile_fields' );
function my_show_extra_profile_fields( $user ) { ?>
@spigotdesign
spigotdesign / gist:5978885
Created July 11, 2013 20:21
Tribe Events query
<?php $current_date = date('j M Y'); ?>
<?php $efeed = new WP_Query( array(
'post_type' => 'tribe_events',
'showposts' => 10,
'start_date' => $current_date,
'end_date' => $current_date
));
?>
@spigotdesign
spigotdesign / tribe-event query
Last active December 19, 2015 15:49
Tribe event category query
<?php $terms = rwmb_meta( '', 'type=taxonomy&taxonomy=tribe_events_cat' ); ?>
<?php foreach ( $terms as $term ) { $ecat = $term->slug; $ename = $term->name; } ?>
<?php $efeed = new WP_Query( array(
'post_type' => 'tribe_events',
'tribe_events_cat' => $ecat,
'showposts' => 5,
));
?>
@spigotdesign
spigotdesign / gist:5980046
Created July 11, 2013 22:54
Tribe Events WP_Query for today's events
<?php $current_date = date("Y-m-d H:i:s"); ?>
<?php $efeed = new WP_Query( array(
'post_type' => 'tribe_events',
'showposts' => 10,
'eventDisplay' => 'custom',
'start_date' => $current_date,
'end_date' => $current_date
));
?>
@spigotdesign
spigotdesign / error-log
Last active December 20, 2015 17:09
Error log for WP Migrate
site_url(): http://dev.mccs.com
home_url(): http://dev.mccs.com
Table Prefix: wp_
WordPress: WP3.6
Web Server: Apache
PHP: 5.4.10
MySQL: 5.5.29
max_allowed_packet_size: 1MB
WP Memory Limit: 40M
WPMDB Bottleneck: 1MB
<?php
/**
* Singular template for Artist CPT
*
*
* @package Oblates
* @subpackage Template
*/
get_header(); // Loads the header.php template. ?>
@spigotdesign
spigotdesign / wp migrate console
Created November 14, 2013 23:09
Migrate error
3 messages are hidden by filters. Show all messages.
Uncaught TypeError: Cannot call method 'create' of undefined measureIt.js:120
event.returnValue is deprecated. Please use the standard event.preventDefault() instead. load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils&ver=3.7.1:4
POST http://oblates.loc/wp-admin/admin-ajax.php 500 (Internal Server Error) load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils&ver=3.7.1:5
send load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils&ver=3.7.1:5
x.extend.ajax load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils&ver=3.7.1:5
migrate_table_recursive script.js?ver=1.2:843
$.ajax.success script.js?ver=1.2:908
c load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils&ver=3.7.1:3
p.fireWith load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils&ver=3.7.1:3
@mixin mq($mq) {
@if $mq == 690 { @media (max-width: 690px) { @content; } }
@if $mq == 320 { @media (max-width: 320px) { @content; } }
@if $mq == retina {
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and ( min--moz-device-pixel-ratio: 2),
only screen and ( -o-min-device-pixel-ratio: 2/1),
only screen and ( min-device-pixel-ratio: 2),
#site-title a {
@include hide-text;
display: block;
background: url(img/icons/spigot-logo.png) center center no-repeat;
width: 250px;
height: 100px;
position: relative;
top:5px;
left: -13px;
.flood .service:nth-of-type(1) {
#redSwatch {
@include animation-name(red-swatch-go);
@extend .animation-settings;
@include transform-origin(32%, 78%);
}
&:hover #redSwatch {
@include animation-name(red-swatch-off);