Skip to content

Instantly share code, notes, and snippets.

@jamigibbs
jamigibbs / related-posts.php
Created Jul 29, 2011
Display Related Posts with Featured Image
View related-posts.php
@jamigibbs
jamigibbs / jg_excerpt.php
Created Aug 17, 2011
Custom Content Excerpt (WordPress)
View jg_excerpt.php
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;
}
View 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 Jan 6, 2014
Sublime Text 2 Theme: Customized Sunburst
View Sunburst_custom.tmTheme
<?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>
View gist:7c23e7aef3531c0fce54
.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 Jan 8, 2015
Customizer Specific Stylesheet
View gist:087171889999c37d8f48
/**
* 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' );
View gist:ce8f51e33642573e6da6
0,15,30,45 * * * * curl -I http://rescuethemes.com/leafping/wp-cron.php?doing_wp_cron
@jamigibbs
jamigibbs / gist:5ad9eb0605a98fe10ab1
Last active Aug 29, 2015
Merch: Mobile Navigation Current Page Color
View gist:5ad9eb0605a98fe10ab1
.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;
}
View gist:c53ab185f45ba251e961
/* 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;
}
}
View gist:5a2cb23dc6304155cb2e
.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;