Skip to content

Instantly share code, notes, and snippets.

@bryanwillis
bryanwillis / template_fwcblgpost.php
Created December 22, 2015 05:25 — forked from cpaul007/template_fwcblgpost.php
Full Width Page Content with Latest Blog Posts
<?php
/*
Template Name: Full Width Content with Blog Posts
*/
//* Add outreach-pro-home body class
add_filter( 'body_class', 'custom_body_class' );
function custom_body_class( $classes ) {
<?php
//* Do NOT include the opening php tag
add_action( 'get_header', 'sk_posts_in_columns' );
function sk_posts_in_columns() {
if ( is_home() || is_archive() ) {
//* Display as columns
add_filter( 'post_class', 'sk_display_in_columns' );
@bryanwillis
bryanwillis / genesis-header-right-div.php
Created January 8, 2016 23:29 — forked from robneu/genesis-header-right-div.php
By default, the Genesis header-right widget area uses an <aside> element. While this is fine most of the time, if you're using the header-right section for your primary navigation it is probably less than ideal for it to be wrapped in an <aside>. This will change the <aside> to a standard <div> element.
<?php
add_filter( 'genesis_markup_header-widget-area_output', 'prefix_opening_header_div', 10, 2 );
/**
* Replace the opening header-right <aside> tag with a <div> tag to allow the
* primary nav to be used in the header without being wrapped in an aside tag.
*
* @param $tag string The current tag for the .header-right widget area.
* @param $args array The current args for genesis_attr()
* @return $tag string The modified tag for the .header-right widget area.
@bryanwillis
bryanwillis / gfm.php
Created January 9, 2016 00:14 — forked from secretstache/gfm.php
Genesis Markup for Foundation
<?php
function ssfg_add_markup_class( $attr, $context ) {
// default classes to add
$classes_to_add = apply_filters ('ssfg-classes-to-add',
// default foundation markup values
array(
'site-header' => 'row',
'site-container' => 'inner-wrap',
'site-footer' => 'row',
'content-sidebar-wrap' => 'row',
@bryanwillis
bryanwillis / Add Remove
Created January 9, 2016 00:17 — forked from jmariano13/Add Remove
Genesis
<?php
//Layout.php
add_action( 'genesis_init', 'genesis_create_initial_layouts', 0 );
Feed.php
add_filter( 'feed_link', 'genesis_feed_links_filter', 10, 2 );
add_action( 'template_redirect', 'genesis_feed_redirect' );
Options.php
add_filter( 'get_term', 'genesis_get_term_filter', 10, 2 );
//SEO.php
add_action( 'after_setup_theme', 'genesis_seo_compatibility_check', 5 );
@bryanwillis
bryanwillis / functions.php
Created January 9, 2016 02:21 — forked from heycharchar/functions.php
Add Genesis Box on Single Posts support for HTML5 by Charlotte Anne
<?php
//* Do NOT include the opening php tag
/** Add Genesis Box on Single Posts support for HTML5 by Charlotte Anne**/
add_action('genesis_before_comments', 'child_genesis_box');
function child_genesis_box() {
if ( is_single() )
require(CHILD_DIR.'/genesis-box.php');
}
@bryanwillis
bryanwillis / Foundation5-Off-Canvas-Wordpress-Genesis.php
Created January 9, 2016 02:22
Add Foundation Off-Canvas Navigation to Wordpress Genesis Child Theme
/**
*
* Off-Canvas Navigation required Open & Close Wraps
*
**/
// OPEN Off Canvas Wraps
add_action('genesis_before_header', 'custom_do_open_off_canvas_wraps', 9);
function custom_do_open_off_canvas_wraps() { ?>
@bryanwillis
bryanwillis / Foundation5-TopBar-Wordpress-Genesis.php
Created January 9, 2016 02:22
Add Foundation Top-Bar Navigation to Wordpress Genesis Child Theme
// A Fork of: http://garethcooper.com/2014/01/zurb-foundation-5-and-wordpress-menus/
/**
*
* Do Primary Top-Bar Navigation
*
**/
add_action('genesis_header', 'custom_do_top_bar_navigation', 11);
function custom_do_top_bar_navigation() { ?>
@bryanwillis
bryanwillis / genesis-box-widget.php
Created January 9, 2016 02:23 — forked from studiopress/genesis-box-widget.php
Genesis box after posts.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Register Genesis box widget area
genesis_register_sidebar( array(
'id' => 'after-post',
'name' => __( 'Genesis Box', 'themename' ),
'description' => __( 'This is a widget area that can be placed after the post', 'themename' ),
) );
@bryanwillis
bryanwillis / genesis-sidebar-defaults.php
Created January 9, 2016 02:25 — forked from wpsmith/genesis-sidebar-defaults.php
Modifies the Genesis Sidebar Defaults
<?php
/*
Plugin Name: Genesis Sidebars Defaults Plugin
Plugin URI: http://www.wpsmith.net/
Description: Modifies the Genesis Sidebar Defaults
Version: 0.0.1
Author: Travis Smith
Author URI: http://www.wpsmith.net/
License: GPLv2