Skip to content

Instantly share code, notes, and snippets.

Avatar

Shelley Denise girlie

  • GirlieWorks, LLC
View GitHub Profile
@malfario
malfario / Monokai-Bright.tmTheme
Created Jun 22, 2011
Monokai Bright Textmate Theme
View Monokai-Bright.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>name</key>
<string>Monokai</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@kasparsd
kasparsd / custom-post-taxonomy-permalinks.php
Created Jun 13, 2012
Create permalink structure URLs for custom post types that include all parent terms from a custom taxonomy
View custom-post-taxonomy-permalinks.php
<?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 Jun 26, 2012
Combine multiple WordPress queries
View gist:2993853
<?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 Jun 27, 2012
Master Stylesheet
View gist:3000405
/*
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 Oct 4, 2012
MOST basic skin ever
View gist:3834940
<?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 Oct 9, 2012
Adding a skin specific box to the boxes queue
View skin-sample.php
<?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
WooCommerce - Show min - max prices for variations, rather than the min price only
View functions.php
/**
* 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 Oct 18, 2012
Add CSS to Thesis via the CSS filter
View gist:3912424
<?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 Dec 14, 2012
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
View content-single-product.php
<?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',
@bgardner
bgardner / functions.php
Last active Oct 19, 2019
Load a custom style sheet on your site using the Genesis Framework.
View functions.php
<?php
//* Do NOT include the opening php tag
//* Load custom style sheet
add_action( 'wp_enqueue_scripts', 'custom_load_custom_style_sheet' );
function custom_load_custom_style_sheet() {
wp_enqueue_style( 'custom-stylesheet', CHILD_URL . '/custom.css', array(), PARENT_THEME_VERSION );
}
//* Replace default style sheet
You can’t perform that action at this time.