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) {
}
<?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(
@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' ) );
}
@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
*/
@bhubbard
bhubbard / carousel-loop.php
Last active September 10, 2016 17:35 — forked from nbeers22/carousel-loop.php
Bootstrap carousel with WordPress loop
@bhubbard
bhubbard / pager.php
Last active September 27, 2015 15:03 — forked from metinsaylan/pager.php
Bootstrap pager links for WordPress single.php template
<?php
// This template can be included in your single.php template to display <Previous-Next> links below your post.
// It uses aligned pager template stated here > http://getbootstrap.com/components/#aligned-links
?>
<nav>
<ul class="pager">
<?php
$post_permalink = get_permalink();
$previous_post = get_permalink(get_adjacent_post(false,'',false));
@bhubbard
bhubbard / gist:2befadc1ad986aaded63
Last active September 11, 2015 16:31 — forked from wcodex/gist:8825693
Custom WordPress search form using bootstrap 3.0
?>
<form class="navbar-form" role="search" action="<?php echo site_url('/'); ?>" method="get" >
<div class="input-group">
<input type="text" class="form-control" placeholder="Search" name="s" id="search" value="<?php the_search_query(); ?>">
<div class="input-group-btn">
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
</form>
@bhubbard
bhubbard / cloudflare-dev-mode.js
Last active October 9, 2015 22:44 — forked from chrisblakley/cloudflare-dev-mode.js
This is a more complete Cloudflare admin bar functionality. Can definitely be more optimized, but it gets the idea across.
function cloudflareDevModeToggle(toggle){
if ( !toggle ){
toggle = 'on';
}
jQuery('.devmodeicon').removeClass('fa-bolt fa-medkit').addClass('fa-spin fa-spinner');
jQuery.ajax({
type: "POST",
url: bloginfo["admin_ajax"],
@bhubbard
bhubbard / 01 - Theme Testing Process.markdown
Created October 27, 2015 22:17 — forked from AlphaGit/01 - Theme Testing Process.markdown
Theme testing process (from Wordpress Codex)

Theme Testing Process

from Theme Development (Wordpress Codex)

  • Fix PHP and WordPress errors. Add the following debug setting to your wp-config.php file to see deprecated function calls and other WordPress-related errors: define('WP_DEBUG', true);. See Deprecated Functions Hook for more information.
  • Check template files against Template File Checklist.
  • Do a run-through using the Theme Unit Test.
  • Validate HTML and CSS. See Validating a Website.
  • Check for JavaScript errors.
  • Test in all your target browsers. For example, IE7, IE8, IE9, Safari, Chrome, Opera, and Firefox.
  • Clean up any extraneous comments, debug settings, or TODO items.