Skip to content

Instantly share code, notes, and snippets.

@neilgee
neilgee / double-header.php
Last active August 29, 2015 13:56
Genesis Header Widget Duplication on Condition
<?php
//Add in new Header Right area
function cgp_extra_widgets() {
genesis_register_sidebar( array(
'id' => 'HeaderRight2',
'name' => __( 'headerright2', 'genesischild' ),
'description' => __( 'This is the Header Right2 Position', 'genesischild' ),
) );
}
@neilgee
neilgee / cat-posts.php
Last active August 29, 2015 13:56
WordPress onPage Loop - Certain Cat Infinite Posts
<?php
// args
$args = array(
'cat' => 14,
'numberposts' => -1
);
// get results
$the_query = new WP_Query( $args );
// The Loop
?>
@neilgee
neilgee / WordPress Dashboard Menu Order
Created March 4, 2014 02:02
WordPress Dashboard Menu Order
0 - at the very top
5 - below Posts
10 - below Media
15 - below Links
20 - below Pages
25 - below comments
60 - below first separator
65 - below Plugins
70 - below Users
@neilgee
neilgee / favicon-genesis.php
Last active August 29, 2015 13:57
Genesis Favicon
<?php
function genesischild_favicon( $favicon_url ) {
return '/favicon.ico';
}
add_filter( 'genesis_pre_load_favicon', 'genesischild_favicon' );
@neilgee
neilgee / backstretch.js
Created March 6, 2014 06:17
Back Stretch
jQuery(document).ready(function($) {
// Create an array of images that you'd like to use
var images = [
'http://example.com/bg-home1.jpg',
'http://example.com/bg-home2.jpg',
'http://example.com/bg-home3.jpg'
];
// Get a random number between 0 and the number of images
@neilgee
neilgee / genesis-facebook-like-box.php
Created March 19, 2014 05:13
Genesis Facebook Like Box HTML5 & Responsive
/*Facebook* CSS Bit/
#fb-root {
display: none;
}
.fb_iframe_widget, .fb_iframe_widget span, .fb_iframe_widget span iframe[style] {
width: 100% !important;
}
<?php
/**
* WC_Shipping_USPS class.
*
* @extends WC_Shipping_Method
*/
class WC_Shipping_USPS extends WC_Shipping_Method {
private $endpoint = 'http://production.shippingapis.com/shippingapi.dll';
@neilgee
neilgee / functions.php
Last active August 29, 2015 13:57 — forked from longjasonm/functions.php
Genesis Four Column Footer Widgets
<?php
//* Do NOT include the opening php tag
// Add support for 4-column footer widgets
add_theme_support( 'genesis-footer-widgets', 4 );
@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>',
@neilgee
neilgee / background-horizontal-rule.css
Created April 1, 2014 04:30
Horizontal Rule Background Through Heading with CSS
h4 {font-size:20px;border-top: 3px solid #4f4e4d; font-family: Arial, sans-serif;}
h4 span { position: relative; top: -15px; padding: 0px 30px; background: #ccc;}