Skip to content

Instantly share code, notes, and snippets.

Bill Erickson billerickson

Block or report user

Report or block billerickson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .gitignore
# Ignore everything #
**
!wp-content/
wp-content/**
!wp-content/themes/
!wp-content/plugins/
wp-content/themes/**
wp-content/plugins/**
# Add two rules for each Theme or Plugin you want to include:
View gist:a045230e5f926e29b3e1
add_action( 'pre_get_posts', 'test_per_dic' );
/**
* Exclude Category from Blog
*
* @author Bill Erickson
* @link http://www.billerickson.net/customize-the-wordpress-query/
* @param object $query data
*
*/
function test_per_dic( $query ) {
View functions.php
<?php
/**
* Enqueue 404 Script
*
*/
function be_404_script() {
if( is_404() )
wp_enqueue_script( 'be-404', get_stylesheet_directory_uri() . '/js/404.js', array( 'jquery' ), '1.0', true );
}
View archive.php
<?php
/**
* Teaser Headline
*
*/
function be_teaser_headline() {
global $wp_query;
if( in_array( 'teaser', get_post_class() ) && 2 == $wp_query->current_post && ! get_query_var( 'paged' ) )
View template-fells.php
<?php
/* Template Name: Fells */
/**
* My Custom Loop
*
*/
function be_custom_loop() {
$tags = wp_get_post_tags( get_the_ID() );
View functions.php
<?php // don't include this line
/**
* Register the homepage sidebar
*
*/
function be_register_home_sidebar() {
genesis_register_widget_area( array( 'id' => 'home-sidebar', 'name' => 'Home Sidebar' ) );
}
add_action( 'genesis_setup', 'be_register_home_sidebar', 15 );
View index.html
<div class="three-fourths first">3/4 column</div>
<div class="one-fouth">1/4 column</div>
View index.html
<div class="one-fourth first"> 1/4 column</div>
<div class="one-half">1/2 column</div>
<div class="one-fourth">1/4 column</div>
View index.html
<div class="two-thirds first">this column is 2/3</div>
<div class="one-third">this column is 1/3</div>
View functions.php
<?php
/**
* Remove post titles from Grid Loop
*
* @author Bill Erickson
* @link http://www.studiopress.com/forums/topic/grid-loop-plugin-remove-post-title/
*/
function be_remove_grid_loop_titles() {
if( apply_filters( 'is_genesis_grid_loop', false ) )
You can’t perform that action at this time.