Skip to content

Instantly share code, notes, and snippets.

View unwiredtech's full-sized avatar

Patrick Sarmiento unwiredtech

View GitHub Profile
@bradtraversy
bradtraversy / pdo_db.php
Created February 21, 2018 12:56
PDO Class
<?php
/*
* PDO DATABASE CLASS
* Connects Database Using PDO
* Creates Prepeared Statements
* Binds params to values
* Returns rows and results
*/
class Database {
private $host = DB_HOST;
@salcode
salcode / bsg-customizer-navbar-logo.php
Created August 6, 2015 20:46
Bootstrap Genesis - add the logo in the nav to the customizer. This file can be dropped into the wp-content/mu-plugins/ directory (note: you may need to create the mu-plugins folder within wp-content if it does not already exist)
<?php
// add customizer controls
add_action( 'customize_register', 'bsg_navbar_brand_logo_customize_register' );
function bsg_navbar_brand_logo_customize_register( $wp_customize ) {
$wp_customize->add_setting( 'brand_logo',
array(
'default' => '',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
@neilgee
neilgee / preheaderwidgetararea.php
Last active August 29, 2015 13:57
Genesis Pre-Header Widget Area Full Width Wrap Left and Right
<?php
//Add in new Widget areas
function genesischild_extra_widgets() {
genesis_register_sidebar( array(
'id' => 'preheaderleft',
'name' => __( 'preHeaderLeft', 'genesischild' ),
'description' => __( 'This is the preheader Left area', 'genesischild' ),
'before_widget' => '<div class="first one-half preheaderleft">',
'after_widget' => '</div>',