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
@bhubbard
bhubbard / tpl-areas-of-expertise.php
Last active September 6, 2017 17:55
WordPress Template page for Areas of Expertise.
<?php
/*
Template Name: Areas of Expertise
*/
get_header(); ?>
<div id="primary" class="site-content">
<div id="content" role="main">
@bhubbard
bhubbard / wp-config.php
Last active March 10, 2019 13:54
A Custom Template for wp-config.php.
<?php
################################################################################
// Custom WP-CONFIG Template.
################################################################################
################################################################################
// For Quick Client Reference
################################################################################
// Client Name:
// Salesforce URL:
@bhubbard
bhubbard / .htaccess
Last active December 25, 2023 02:59
This is my template .htaccess file for WordPress on Cloud Sites.
# Apache Server Config | MIT License
# https://gist.github.com/bhubbard/6082577
# Modified from https://github.com/h5bp/server-configs-apaches
# ##############################################################################
# # Default WordPress #
# ##############################################################################
# http://randomtype.ca/blog/the-wordpress-htaccess-file-explained/
# BEGIN WordPress
<div itemprop="review" itemscope itemtype="http://schema.org/Review">
<div itemprop="author" itemscope itemtype="http://schema.org/Person">
<h1 class="headline" itemprop="name"><?php the_title(); ?></h1>
</div>
<div class="the-content" itemprop="reviewBody">
<?php the_content(); ?>
</div>
@bhubbard
bhubbard / childpage-loop.php
Last active September 6, 2017 17:55
Loop for Child Pages.
<!-- Display all child pages -->
<?
$child_pages = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = ".$post->ID." AND post_type = 'page' ORDER BY menu_order", 'OBJECT');
if ( $child_pages ) :
foreach ( $child_pages as $pageChild ) :
setup_postdata( $pageChild );
$thumbnail = get_the_post_thumbnail($pageChild->ID, 'thumbnail');
if($thumbnail == "") continue; // Skip pages without a thumbnail
@bhubbard
bhubbard / reset-idxbroker-widgets.css
Last active August 11, 2021 10:57
A starting css template for IDX Broker
/* -------------------------------------------------------- */
/* IDX BROKER WIDGET RESETS */
/* -------------------------------------------------------- */
/* SHOWCASE WIDGET
----------------------------------------------------------- */
.IDX-showcaseTable {
max-width: 100% !important;
}
.IDX-showcaseCell {
add_filter('yoast-ga-custom-vars','add_ga_custom_vars',10,2);
function add_ga_custom_vars($push, &$customvarslot) {
$my_custom_val = "whaterver";
$push[] = "'_setCustomVar',".$customvarslot.",'My_Custom_Variable','".$my_custom_val."',3";
$customvarslot++;
return $push;
}
/* -------------------------------------------------------- */
/* IDX BROKER CUSTOM CSS */
/* -------------------------------------------------------- */
/* GLOBAL
----------------------------------------------------------- */
#IDX-main {width: 100% !important;}
$ curl https://raw.github.com/wp-cli/wp-cli.github.com/master/installer.sh | bash
$ export PATH=$PATH:$HOME/.wp-cli/bin
# Add this line to .bash_profile
alias mysql="/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot"
@bhubbard
bhubbard / .htaccess
Created October 15, 2013 06:42
Default WordPress .htaccess file.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>