Skip to content

Instantly share code, notes, and snippets.

View bhubbard's full-sized avatar
:octocat:
Hello

Brandon Hubbard bhubbard

:octocat:
Hello
View GitHub Profile
/*==================================================
= Bootstrap 3 Media Queries =
==================================================*/
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
@bhubbard
bhubbard / archive-listing.php
Last active January 6, 2016 00:18
WP Listing Templates
<?php get_header(); ?>
<?php echo post_type_archive_title(); ?>
<h1><?php echo post_type_archive_title(); ?></h1>
<?php
/** Replace the standard loop with our custom Locations loop */
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'wpseo_locations_archive_loop' );
function wpseo_locations_archive_loop() {
echo '<h1>Locations</h1>';
echo '<div class="entry-content"><p>Your intro text here.</p></div>';
$args = array(
<!-- Using jQuery -->
<script type=”text/javascript” >
jQuery( document ).ready(
function() {
var strAction = $(“#IDX-searchForm”).attr(“action”);
console.log(strAction + “?idxID=b040&commingle” );
jQuery(“#IDX-searchForm”).attr(“action”, strAction + “?idxID=b040&commingle” );
});
</script>
Diverse Solutions options
widget_dsidx-search
widget_dsidx-list-areas
widget_dsidx-listings
@bhubbard
bhubbard / gist:6dd8761e9ffd18eeb265
Created July 30, 2015 17:55
Find all posts with ninja form shortcode
SELECT ID FROM wp_posts WHERE post_content LIKE '%[ninja_forms%'
@bhubbard
bhubbard / wpengine_cdn_url.php
Last active August 29, 2015 14:26 — forked from pwenzel/wpengine_cdn_url.php
Get WPEngine CDN URL for your blog.
<?php
if (class_exists('WpeCommon')){
$wpe_common = new WpeCommon();
$cdn_url = $wpe_common->get_cdn_domain($wpe_netdna_domains,get_bloginfo( 'url' ) );
}
<?php
function ewp_remove_script_version( $src ){
return remove_query_arg( 'ver', $src );
}
add_filter( 'script_loader_src', 'ewp_remove_script_version', 15, 1 );
add_filter( 'style_loader_src', 'ewp_remove_script_version', 15, 1 );
@bhubbard
bhubbard / ZENDEKS TO DEKS TXT
Last active September 2, 2015 23:39
I liked the Zendesk.com reply template but since I prefer Desk.com I prepared a template for Desk.com
{% assign emails = case.emails %}
{% assign threadlength = emails.size|minus:1 %}
{% for email in emails reversed %}
{% if forloop.first %}
----------------------------------------------
{{email.agent.name_public}} (Place_your_web_here.com), {{email.created_at | date: "%b %d, %Y"}}, {{email.created_at | in_time_zone: site.timezone | date: "%I:%M%p %Z"}}
{{email.new_html}}
@bhubbard
bhubbard / desk_multipass.php
Last active December 14, 2017 01:52 — forked from tstachl/desk_multipass.php
WordPress - Desk.com Multipass SSO Plugin
<?php
/**
* Plugin Name: Desk.com Multipass
* Plugin URI: https://github.com/tstachl/wp-desk_multipass
* Description: A WordPress plugin to add a menu option that redirects to your Desk.com Support Site.
* Version: 1.0.0
* Author: Thomas Stachl
* Author URI: https://github.com/tstachl
* License: BSD 3-Clause License
*/