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 gist:1717547
<?php
add_action( 'genesis_after_header', 'be_change_sidebar_order' );
/**
* Swap Primary and Secondary Sidebars on Sidebar-Sidebar-Content
*
* @author Bill Erickson
* @link http://www.billerickson.net/switch-genesis-sidebars/
*/
function be_change_sidebar_order() {
@billerickson
billerickson / genesis-custom-loop-pagination.php
Created Jul 31, 2012
Genesis custom loop with pagination
View genesis-custom-loop-pagination.php
<?php
/* Template Name: Test */
/**
* Genesis custom loop
*/
function be_custom_loop() {
global $post;
// arguments, adjust as needed
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 plugin.php
<?php
/**
* Don't Update Plugin
*
* This prevents you being prompted to update if there's a public plugin
* with the same name.
*
* @since 1.0.0
* @author Mark Jaquith
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 click-to-load.php
<?php
/**
* Javascript for Load More
*
*/
function be_load_more_js() {
global $wp_query;
$args = array(
View template-landing.php
<?php
/**
* Your Child Theme
*
* Template Name: Landing
*/
/**
* Flexible Content
*
View functions.php
<?php
function be_call_to_action() {
$title = esc_html( get_option( 'options_be_cta_title' ) );
$button_text = esc_html( get_option( 'options_be_cta_button_text' ) );
$button_url = esc_url( get_option( 'options_be_cta_button_url' ) );
if( $title && $button_text && $button_url )
echo '<div class="call-to-action"><div class="wrap"><p>' . $title . '</p><p><a href="' . $button_url . '" class="button">' . $button_text . '</a></p></div></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 ) )
View functions.php
<?php
//----------------------------------------------------------
// Display Posts Shortcode plugin: add H2 to title
//----------------------------------------------------------
add_filter( 'display_posts_shortcode_output', 'format_dps_title', 10, 9 );
function format_dps_title( $output, $original_atts, $image, $title, $date, $excerpt, $inner_wrapper, $content, $class ) {
// Make Title and H2
$title = ' <h3>'. $title .'</h3>';
You can’t perform that action at this time.