Skip to content

Instantly share code, notes, and snippets.

View jamigibbs's full-sized avatar

Jami Gibbs jamigibbs

View GitHub Profile
@jamigibbs
jamigibbs / gist:52fe3d96b9a2f8b86f3f
Created March 9, 2015 19:24
Advocator: Back menu item in header
#menu-top-header .back.js-generated {
display: none !important;
}
@jamigibbs
jamigibbs / gist:1950db291a93fb776685
Created March 9, 2015 19:55
Advocator: Customizer Style Page
<?php
/**
* Implements styles set in the theme customizer
*
* @package Customizer Library Demo
*/
if ( ! function_exists( 'customizer_library_demo_build_styles' ) && class_exists( 'Customizer_Library_Styles' ) ) :
/**
* Process user options to generate CSS needed to implement the choices.
*
@jamigibbs
jamigibbs / gist:30c5996ea5daad1857f1
Created March 9, 2015 20:04
Advocator: Remove events price
.tribe-events-event-cost {
display: none;
}
function custom_field() {
global $post;
$url = get_post_meta( $post->ID, 'hero_style', true );
if ( ! empty( $url ) ) {
echo 'My Button';
}
}
add_filter( 'field', 'custom_field' );
@jamigibbs
jamigibbs / gist:f7816cd343bc0f5abd4b
Created March 11, 2015 16:46
Advocator: Home page two events
.home_events_wrap .medium-4 {
width: 45%;
}
@jamigibbs
jamigibbs / gist:9d76ae625e6a25e2b5a1
Created March 11, 2015 17:02
Advocator: Top of footer spacing
footer#site_footer .footer_widget_wrap {
margin-bottom: 0;
}
footer#site_footer {
padding-top: 0;
}
@jamigibbs
jamigibbs / gist:295d05fc1220cabab1d2
Created March 14, 2015 18:28
Advocator: Event Data Display
#tribe-events .vcard {
display: block;
}
@jamigibbs
jamigibbs / gist:0aa2c0c3cadcc17967a4
Last active August 29, 2015 14:17
Heartfelt: Header Columns
/* The Logo Space */
.bottom_nav_wrap .large-3 {
width: 40%;
}
/* The Navigation Space */
.bottom_nav_wrap .large-9 {
width: 60%;
}
@jamigibbs
jamigibbs / gist:57460b32af239d3a6a17
Created March 17, 2015 16:33
Rescue Shortcodes: Button
[rescue_button color="black" url="http://weloveleathermilk.co.uk/shop/" title="Buy Now" target="blank" class="right" border_radius="3px"] Buy Now [/rescue_button]
@jamigibbs
jamigibbs / gist:c057fe2d445b7723a665
Created March 23, 2015 22:15
Delete retina-ready images
add_filter( 'delete_attachment', 'delete_retina_support_images' );
/**
* Delete retina-ready images
*
* This function is attached to the 'delete_attachment' filter hook.
* Reference: http://code.tutsplus.com/tutorials/ensuring-your-theme-has-retina-support--wp-33430
*/
function delete_retina_support_images( $attachment_id ) {
$meta = wp_get_attachment_metadata( $attachment_id );