Skip to content

Instantly share code, notes, and snippets.

@sevenspark
sevenspark / custom.css
Last active January 7, 2016 14:05
Manual integration of UberMenu into Specular theme
/* Add in CSS Tweaks - Mobile */
header#header .row-fluid div.span12, div.header_wrapper{
height:auto;
min-height:100px;
}
#header #logo{
float:none;
text-align:center;
margin-top:15px;
@sevenspark
sevenspark / functions.php
Created August 8, 2013 16:23
UberMenu Post Grid Shortcode & Styling
<?php
/** ADD EVERYTHING BELOW THIS LINE TO YOUR CHILD THEME'S FUNCTIONS.PHP **/
function ubermenu_post_grid( $atts ){
//we're going to need access to the UberMenu object for image functionality
global $uberMenu;
@sevenspark
sevenspark / video.php
Created August 14, 2012 12:43
Self-hosted video module for Agility
<?php
/**
* Self-hosted Video Module
*/
function agility_videojs_scripts_and_styles(){
global $agilitySettings;
if( $agilitySettings->op( 'self-hosted-video' ) ){
@sevenspark
sevenspark / gist:3317648
Created August 10, 2012 20:34
Gallery Shortcode
/**
* Agility's Gallery shortcode, implemented by filter
*/
add_filter( 'post_gallery', 'agility_gallery_shortcode', 10, 2 );
function agility_gallery_shortcode( $output, $attr ) {
global $post;
static $instance = 0;
$instance++;
@sevenspark
sevenspark / styles.css
Created December 20, 2011 04:58
ThemeSwitcher + Preview
/* Preview hover styles */
#theme_list ul li {
position:relative;
}
.product-preview{
position:absolute;
left:100%;
top:-1px;
margin-left:1px;
background:#222;
@sevenspark
sevenspark / autoreposition.js
Created August 10, 2011 00:51
Auto Reposition jQuery Dialogs
//Makes Scroll Checkpoint Dialogs reposition automatically when the window size changes
//Hopefully has a positive influence on mobile devices
jQuery(document).ready(function($){
$.ui.dialog.prototype.options.autoReposition = true;
$( window ).resize(function() {
$( ".ui-dialog-content:visible" ).each(function() {
var dialog = $( this ).data( "dialog" );
if ( dialog.options.autoReposition ) {
dialog.option( "position", dialog.options.position );
@sevenspark
sevenspark / cf7_form.php
Created August 9, 2011 19:11
CF7 DTX Manual Link
//This is your CF7 form tag, which retrieves the GET var 'payload'
[dynamictext my_payload "CF7_GET key='payload'"]
//This goes into the message body, or any CF7 field
[my_payload]
//See http://sevenspark.com/code/how-to-create-a-dynamic-wordpress-contact-form for additional info
@sevenspark
sevenspark / functions.php
Created April 29, 2011 13:31
YARPP Custom Template for Scroll Checkpoint
/*
* This is the code that is required to create the 100x80 thumbnail on upload.
* It only affects newly uploaded images, so you may need to use a tool like
* http://wordpress.org/extend/plugins/regenerate-thumbnails/
*/
if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );
add_image_size( 'relatedsize', 100, 80, true);
}