View gist:6272257
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
// Load jQuery | |
if ( !is_admin() ) { | |
wp_enqueue_script('jquery'); | |
} |
View gist:6427920
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_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]-->'; | |
} | |
} |
View gist:7588915
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 | |
$rows = get_field( 'testimonials', 'option' ); | |
$row_count = count($rows); | |
$i = rand(0, $row_count - 1); | |
echo '<blockquote><p>' . $rows[$i]['quote'] . '</p>'; | |
echo '<cite>' . $rows[$i]['cite'] . '</cite></blockquote>'; | |
?> |
View gist:8028035
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
function search_filter($query) { | |
if ( !is_admin() && $query->is_main_query() ) { | |
if ($query->is_search) { | |
$query->set( 'post_type', array( 'listing' ) ); | |
$query->set( 'posts_per_page', -1 ); | |
} | |
} | |
} | |
add_action('pre_get_posts','search_filter'); |
View gist:8057807
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
<style type="text/css">/* | |
fixes alignment on mobile site | |
*/ | |
#remarks { | |
float: inherit !important; | |
padding-bottom: 0px !important; | |
} | |
</style> |
View gist:8290577
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
function swg_scripts() { | |
// Load our main stylesheet. | |
wp_enqueue_style( 'swg-style', get_stylesheet_uri() ); | |
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { | |
wp_enqueue_script( 'comment-reply' ); | |
} | |
wp_enqueue_script( 'swg-superfish', get_template_directory_uri() . '/js/superfish.js', array( 'jquery' ), '20131209', true ); |
View gist:8587678
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 to .htaccess | |
AddType application/octet-stream vcf | |
## Add to functions.php in active theme | |
add_filter('upload_mimes', 'custom_upload_mimes'); | |
function custom_upload_mimes ( $existing_mimes=array() ) { | |
// add your extension to the array | |
$existing_mimes['vcf'] = 'text/x-vcard'; |
View gist:8608314
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
<div class="listing"> | |
<?php get_template_part( 'idx/single', 'gallery' ); ?> | |
<?php get_template_part( 'idx/single', 'title' ); ?> | |
<?php get_template_part( 'idx/single', 'price' ); ?> | |
<?php get_template_part( 'idx/single', 'description' ); ?> | |
View gist:8698426
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
<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> |
View gist:9211903
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
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' ); |
OlderNewer