Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Javascript for Load More
*
*/
function be_load_more_js() {
global $wp_query;
$args = array(
@billerickson
billerickson / page_featured_blog.php
Last active July 21, 2018 05:58 — forked from ChristopherNeetz/page_featured_blog.php
Genesis page template with full blog post and additional posts with excerpts
# 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:
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 ) {
<?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 );
}
<?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' ) )
<?php
/* Template Name: Fells */
/**
* My Custom Loop
*
*/
function be_custom_loop() {
$tags = wp_get_post_tags( get_the_ID() );
<?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 );
<div class="three-fourths first">3/4 column</div>
<div class="one-fouth">1/4 column</div>
<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>