Skip to content

Instantly share code, notes, and snippets.

View jamigibbs's full-sized avatar

Jami Gibbs jamigibbs

View GitHub Profile
@jamigibbs
jamigibbs / related-posts.php
Created July 29, 2011 14:34
Display Related Posts with Featured Image
@jamigibbs
jamigibbs / jg_excerpt.php
Created August 17, 2011 10:13
Custom Content Excerpt (WordPress)
function jg_excerpt($num) {
$limit = $num+1;
$excerpt = explode(' ', get_the_excerpt(), $limit);
array_pop($excerpt);
$excerpt = implode(" ",$excerpt).""; // Put anything between the "" for end of excerpt
echo $excerpt;
}
@jamigibbs
jamigibbs / vt_resize.php
Last active December 15, 2015 01:39 — forked from seedprod/vt_resize.php
<?php
/*
* Resize images dynamically using wp built in functions
* Victor Teixeira
*
* php 5.2+
*
* Exemplo de uso:
*
* <?php
@jamigibbs
jamigibbs / Sunburst_custom.tmTheme
Created January 6, 2014 16:28
Sublime Text 2 Theme: Customized Sunburst
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Stanley Rost</string>
<key>comment</key>
<string>(π) Soryu, 2005</string>
<key>name</key>
<string>Sunburst</string>
@jamigibbs
jamigibbs / gist:7c23e7aef3531c0fce54
Created October 16, 2014 20:57
Whiskey Tango Foxtrot
.template_pets_wrap .pet_meta_wrap ul li:before {
content: "\f00c";
font-family: FontAwesome;
font-size: .85em;
display: inline-block;
margin-left: -1.2em;
width: 1.5em;
color: #e2e2e2;
}
@jamigibbs
jamigibbs / gist:087171889999c37d8f48
Created January 8, 2015 14:17
Customizer Specific Stylesheet
/**
* Custom Customizer Style
*/
function custom_customizer_style() {
wp_enqueue_style( 'rescue-customizer-style', get_template_directory_uri() . '/customizer/style.css', array(), '', 'all' );
}
add_action( 'customize_controls_enqueue_scripts', 'custom_customizer_style' );
0,15,30,45 * * * * curl -I http://rescuethemes.com/leafping/wp-cron.php?doing_wp_cron
@jamigibbs
jamigibbs / gist:5ad9eb0605a98fe10ab1
Last active August 29, 2015 14:15
Merch: Mobile Navigation Current Page Color
.top-bar-section li.current_page_item:not(.has-form) a:not(.button) {
color: #aaaaaa;
}
/* For mobile only, use this */
@media only screen and (max-width: 40em) {
.top-bar-section li.current_page_item:not(.has-form) a:not(.button) {
color: #aaaaaa;
}
/* Change the number to reflect however many prodcuts to show in a single row */
if (!function_exists('merch_loop_columns')) {
function merch_loop_columns() {
return 3;
}
}
@jamigibbs
jamigibbs / gist:5a2cb23dc6304155cb2e
Created February 24, 2015 17:46
Merch: Category Page
.woocommerce.archive ul.products li.product {
margin-bottom: 5em;
}
.woocommerce.archive ul.products li.product h3 {
top: 1.5em;
color: #616671;
}
.woocommerce.archive mark {
background-color: #f6f6f6;
color: #888f9e;