Skip to content

Instantly share code, notes, and snippets.

@sproutventure
sproutventure / GBS Theme Homepage Loop
Created September 29, 2010 23:39
GBS Theme Homepage Loop
<?php
$count = 1;
$deal_query= null;
$args=array(
'post_type' => 'deal',
'post_status' => 'publish',
'posts_per_page' => '3' // Change the total you want to return here
);
$deal_query = new WP_Query($args);
while ($deal_query->have_posts()) : $deal_query->the_post(); // Start building the content
<?php
/*
Template Name: Loop template
*/
get_header();
?>
<div id="loop" class="grid_8 alpha clearfix">
<div id="content">
@sproutventure
sproutventure / IE browser class updated.
Created October 29, 2010 18:27
IE browser body class
// Checks userAgent and adds body classes for IE
jQuery(document).ready(function() {
if (jQuery.browser.msie) {
jQuery('body').addClass('ie');
jQuery('body').addClass('ie' + $.browser.version.substring(0, 1));
}
});
<?php
$count = 1;
$wp_query= null;
$args=array(
'taxonomy' => 'course-category', // taxonomy slug
'post_status' => 'publish',
'posts_per_page' => 2
);
$wp_query = new WP_Query($args);
while ($wp_query->have_posts()) : $wp_query->the_post();
array(
'inner_bg' => array(
'div.BorderOption-One',
'div.Container-Footer'
),
'content_bg' => array(
'#GetPointsRSS',
'#UsePointsRSS',
'.tInformation',
'#CenterCol',
/*********** General ***********/
$this->registerColorChooser( array(
'id' => 'body_color',
'selector' => 'body, .body_color',
'name' => __('Body Text Color'),
'foreground' => true,
'default' => '000000',
@sproutventure
sproutventure / Override GBS subscription
Created November 16, 2010 18:03
remove original action and create a new one.
function group_buying_subscription_new()
{
if( isset( $_POST['set-group-buying-subscription'] ) && !isset( $_POST['email_address'] ) ) {
setcookie( 'your-selected-location', $_POST['deal_location'], time( ) + 24 * 60 * 60 * 30, '/' );
wp_redirect( site_url() );
exit();
}
elseif( isset( $_POST['set-group-buying-subscription'] ) ) {
// Remove the old filters
global $gbac;
remove_filter('gbs_message_share_max', array( $gbac, 'gbs_message_share_max_new' ) );
remove_filter('gbs_message_share', array( $gbac, 'gbs_message_share_new' ) );
// Create new filters
add_filter('gbs_message_share_max', 'gbs_message_share_max_custom' );
add_filter('gbs_message_share', 'gbs_message_share_custom' );
// Message when a max is used
/*********** General ***********/
$this->registerColorChooser( array(
'id' => 'body_color',
'selector' => 'body, .body_color',
'name' => __('Body Text Color'),
'foreground' => true,
'default' => '000000',
'group' => __('General'),
<div class="mceTemp"><dl id="attachment_798" class="wp-caption alignleft" style="width: 310px;"> <dt class="wp-caption-dt"><img class="size-medium wp-image-798" title="elizabeth edwards" src="http://theriver1079.production.townsquaresites.com/files/2010/12/elizabeth-edwards-300x200.jpg" alt="elizabeth edwards" width="300" height="200" /></dt> <dd class="wp-caption-dd">Getty Images</dd> </dl>Her private life was out for the whole world to see, hear, and read about. Through Elizabeth Edwards ordeal, she held on to the ideals that faith, family, and marriage are based upon.
</div>
<blockquote>
<div class="mceTemp">"Today we have lost the comfort of Elizabeth's presence but, she remains the heart of this family, the family said in a statement. "We love her and will never know anyone more inspiring or full of life. On behalf of Elizabeth we want to express our gratitude to the thousands of kindred spirits who moved and inspired her along the way. Your support and prayers touched our entire family."</div>
<div cla