Skip to content

Instantly share code, notes, and snippets.

View rickalee's full-sized avatar

Ricky Lee Whittemore rickalee

View GitHub Profile
@rickalee
rickalee / gist:8698426
Created January 29, 2014 22:22
idx-results wrapper
<div class="idx-results">
<div class="listing-excerpt"></div>
<div class="listing-excerpt"></div>
<div class="listing-excerpt"></div>
<div class="listing-excerpt"></div>
<div class="listing-excerpt"></div>
<div class="listing-excerpt"></div>
<div class="listing-excerpt"></div>
<div class="listing-excerpt"></div>
<div class="listing-excerpt"></div>
@rickalee
rickalee / gist:9211903
Created February 25, 2014 16:06
Email Alerts - Filter Subject
function kcannon_new_listings_notifications_subject() {
return 'New Listing Notification | Karen Cannon Realtors';
}
add_filter( 'idx_send_new_listings_notifications_subject', 'kcannon_new_listings_notifications_subject' );
@rickalee
rickalee / gist:10170090
Created April 8, 2014 18:47
Gravity Forms Access to Editors
function add_grav_forms(){
$role_object = get_role( 'editor' );
$role_object->add_cap( 'edit_theme_options' );
$role = get_role('editor');
$role->add_cap('gform_full_access');
}
add_action('admin_init','add_grav_forms');
@rickalee
rickalee / gist:10475557
Created April 11, 2014 14:56
WordPress Share Buttons
<a class="share-on-link share-on-twitter" href="https://twitter.com/intent/tweet?text=<?php echo urlencode(the_title_attribute('echo=0')); ?>&url=<?php the_permalink();?>">Twitter</a>
<a class="share-on-link share-on-facebook" href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink();?>">Facebook</a>
<a class="share-on-link share-on-googleplus" href="https://plus.google.com/share?url=<?php the_permalink();?>">Google+</a>
@rickalee
rickalee / gist:6e4e2927adfd66c7ca0b
Created June 6, 2014 17:41
Filter Widget Title to add span on first word
add_filter ( 'widget_title', 'kellyboudreau_add_span_widgets' );
function kellyboudreau_add_span_widgets( $old_title ) {
$title = explode( " ", $old_title, 2 );
if ( isset( $title[0] ) && isset( $title[1] ) ) {
$titleNew = "<span>$title[0]</span> $title[1]";
}
else {
return;
}
return $titleNew;

IDX Shortcode Documentation

idx_form

Description: Used to display a form

Allowed Attributes:

  • id -- The id of the form to be displayed.
  • action -- Sets the 'action' HTML attribute on the form (i.e. where it submits to)
@rickalee
rickalee / gist:5eb1565c4d867345e335
Last active August 29, 2015 14:06
Breakpoint Mixin, Clearfix and Wrap
@mixin breakpoint($point) {
@if $point == lt-phablet {
@media all and (max-width: 599px) { @content; }
}
@if $point == phablet {
@media all and (min-width: 600px) { @content; }
}
@if $point == lt-tablet {
@media all and (max-width: 767px) { @content; }
}
@rickalee
rickalee / gist:13e570cb45174d1f68ed
Created December 3, 2015 15:54
Shortcake UI Alignment
shortcode_ui_register_for_shortcode(
'wfcf_deal',
array(
'label' => 'Deal',
'listItemImage' => 'dashicons-awards',
'attrs' => array(
array(
'label' => 'Select Deal',
'attr' => 'deal',
'type' => 'post_select',
@rickalee
rickalee / gist:6272257
Created August 19, 2013 18:11
Ways to Enqueue jQuery
// Load jQuery
if ( !is_admin() ) {
wp_enqueue_script('jquery');
}
@rickalee
rickalee / gist:6427920
Last active December 22, 2015 05:59
HTML5 for IE
<?php
add_action( 'wp_head', 'swg_add_ie_html5_shim' );
function swg_add_ie_html5_shim() {
global $is_IE;
if ( $is_IE ) {
echo '<!--[if lt IE 9]>';
echo '<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>';
echo '<![endif]-->';
}
}