Skip to content

Instantly share code, notes, and snippets.

Bill Erickson billerickson

View GitHub Profile
View click-to-load.php
<?php
/**
* Javascript for Load More
*
*/
function be_load_more_js() {
global $wp_query;
$args = array(
@billerickson
billerickson / page_featured_blog.php
Last active Jul 21, 2018 — forked from ChristopherNeetz/page_featured_blog.php
Genesis page template with full blog post and additional posts with excerpts
View page_featured_blog.php
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>
You can’t perform that action at this time.