This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/** | |
* Repeatable Custom Fields in a Metabox | |
* Author: Helen Hou-Sandi | |
* | |
* From a bespoke system, so currently not modular - will fix soon | |
* Note that this particular metadata is saved as one multidimensional array (serialized) | |
*/ | |
function hhs_get_sample_options() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Borrowed from https://github.com/addyosmani/jquery-ui-bootstrap | |
* Styles the datepicker popup for gravityforms used with bootstrap | |
*/ | |
/* | |
* jQuery UI Datepicker | |
* | |
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
* http://jquery.org/license |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script src="jquery.ketchup.all.min.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<div id="email"> | |
<span>Enter your email to sign up</span> | |
<form action="/subscribe.php" id="invite" method="POST"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WooCommerce Extra Feature | |
* -------------------------- | |
* | |
* Register a shortcode that creates a product categories dropdown list | |
* | |
* Use: [product_categories_dropdown orderby="title" count="0" hierarchical="0"] | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* A walker class to use that extends wp_dropdown_categories and allows it to use the term's slug as a value rather than ID. | |
* | |
* See http://core.trac.wordpress.org/ticket/13258 | |
* | |
* Usage, as normal: | |
* wp_dropdown_categories($args); | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 ); | |
function woo_remove_product_tabs( $tabs ) { | |
unset( $tabs['description'] ); // Remove the description tab | |
unset( $tabs['reviews'] ); // Remove the reviews tab | |
unset( $tabs['additional_information'] ); // Remove the additional information tab | |
return $tabs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_shortcode( 'dot_recommended_posts', array( &$this, 'dot_recommended_top_posts' ) ); | |
function dot_recommended_top_posts( $atts, $content = null ) | |
{ | |
// get our variable from $atts | |
$atts = shortcode_atts( array( | |
'container' => 'li', | |
'number' => '10', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// awesome semantic comment | |
function better_comment($comment, $args, $depth) { | |
$GLOBALS['comment'] = $comment; | |
extract($args, EXTR_SKIP); | |
if ( 'article' == $args['style'] ) { | |
$tag = 'article'; | |
$add_below = 'comment'; | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Piggyback Yoast SEO OpenGraph output to add Pinterest | |
* Rich Pin OpenGraph data for WooCommerce products | |
*/ | |
add_filter( 'wpseo_opengraph_type', function( $og_type ) { | |
if ( 'product' == get_post_type() ) { | |
$og_type = 'product'; | |
} |
OlderNewer