Skip to content

Instantly share code, notes, and snippets.

View girlie's full-sized avatar

Shelley Denise girlie

  • GirlieWorks, LLC
View GitHub Profile
@malfario
malfario / Monokai-Bright.tmTheme
Created June 22, 2011 22:05
Monokai Bright Textmate Theme
<?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>name</key>
<string>Monokai</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@kasparsd
kasparsd / custom-post-taxonomy-permalinks.php
Created June 13, 2012 15:47
Create permalink structure URLs for custom post types that include all parent terms from a custom taxonomy
<?php
/*
Term Archive Pages:
- http://example.com/recipes/dinner/
- http://example.com/recipes/breakfast,brunch/
Single Recipe Pages:
- http://example.com/recipes/dinner/soup-title/
@jcobb
jcobb / gist:2993853
Created June 26, 2012 06:42
Combine multiple WordPress queries
<?php
// An example of creating two separate WP queries, combining the results,
// sorting by date and formatting the results for us in a loop like a regular query.
// order the posts by date in descending order (should go in functions.php to keep things tidy)
function order_by_date( $a, $b )
{
return strcmp( $b->post_date, $a->post_date );
}
@jacksonfdam
jacksonfdam / gist:3000405
Created June 27, 2012 00:15
Master Stylesheet
/*
URL: http://www.crucialwebhost.com/blog/master-stylesheet-the-most-useful-css-technique/
One of the most common mistakes I see beginners and intermediates fall victim to when it comes to CSS is not removing the default browser styling. This leads to inconsistencies in the appearance of your design across browsers, and ultimately leaves a lot of designers blaming the browser. It is a misplaced blame, of course. Before you do anything else when coding a website, you should reset the styling.
*/
/***** Global Settings *****/
html, body {
@mattonomics
mattonomics / gist:3834940
Created October 4, 2012 16:58
MOST basic skin ever
<?php
/*
Name: The Name of Your Skin
Author: Your Name
Description: A succinct description of what you're doing in this skin, special features, etc.
Version: 1.0
Class: unique_class_name
*/
@mattonomics
mattonomics / skin-sample.php
Created October 9, 2012 21:38
Adding a skin specific box to the boxes queue
<?php
class example_skin_class extends thesis_skin {
// list of box classes you want to add to the queue
// do not give these strings for keys or everything will blow up
public $boxes_class_list = array(
'box_class_one',
'box_class_two',
'box_class_three',
'box_class_four',
@cobbman
cobbman / functions.php
Last active May 30, 2018 18:14
WooCommerce - Show min - max prices for variations, rather than the min price only
/**
* This code should be added to functions.php of your theme
**/
//This changes the "From:" price on the products page to a Rent-Buy value instead.
// ***** It ALSO checks to see if the product is on sale, and displays the sale price instead of the top variable price
add_filter('woocommerce_variable_price_html', 'custom_variation_price', 10, 2);
function custom_variation_price( $price, $product ) {
$price = '';
@mattonomics
mattonomics / gist:3912424
Created October 18, 2012 15:04
Add CSS to Thesis via the CSS filter
<?php
// add css using the thesis_css filter
class your_skin_class extends thesis_skin {
function construct() {
add_filter('thesis_css', array($this, 'add_css'));
}
@georgybu
georgybu / content-single-product.php
Created December 14, 2012 12:09
WooCommerce - Show next\prev products from current product category (when viewing a single product) 1. If product is last -> Next product is first 2. If product is first -> Prev product is last forked from https://gist.github.com/2176823 (This question was in http://stackoverflow.com/questions/13597687/woocommerce-get-next-previous-product/13612387
<?php
// get next and prev products
// Author: Georgy Bunin (bunin.co.il@gmail.com)
// forked from https://gist.github.com/2176823
function ShowLinkToProduct($post_id, $categories_as_array, $label) {
// get post according post id
$query_args = array( 'post__in' => array($post_id), 'posts_per_page' => 1, 'post_status' => 'publish', 'post_type' => 'product', 'tax_query' => array(
array(
'taxonomy' => 'product_cat',
@deckerweb
deckerweb / multisite-functions.php
Last active February 12, 2016 21:57
For Genesis Child Themes in Multisite -- one child theme for lots of sub sites: Pull in site-specific functions & stylesheet files, if available.
<?php
/**
* General Usage:
* Set "child-theme-slug" to the main child theme slug. Set "id" to actual Blog/ Site ID.
* Current: For Multisite installs that were made with 3.5+
* a) Place functions files in wp-content/uploads/sites/{id}/{child-theme-slug}/functions-site-{id}.php
* b) Place stylesheet files in wp-content/uploads/sites/{id}/{child-theme-slug}/styles-site-{id}.php
*
* Backward compatibility for Multisite installs that were made prior 3.5