Skip to content

Instantly share code, notes, and snippets.

@robneu
robneu / time.php
Last active March 25, 2017 19:36 — forked from gleddy/time.php
cookbook snippet
// customize single post header content for dx5
add_action( 'genesis_entry_header', 'dx5_do_post_header');
function dx5_do_post_header() {
genesis_markup( array(
'html5' => '<header %s>',
'context' => 'dx5-post-heading',
) );
@robneu
robneu / .htaccess
Last active February 1, 2017 20:47 — forked from brichards/.htaccess
Tell Apache to serve missing images from a remote server. Props http://stackoverflow.com/questions/5130410/modrewrite-to-another-server-if-file-image-is-not-found
# BEGIN serve images from production
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteRule ^(.*\.(js|css|png|jpe?g|gif|ico|svg)) http://example.com/$1 [NC,P,L]
</IfModule>
# END serve images from production
<?php
/**
* This file adds the Home Page to the Tidy Theme.
*/
add_action( 'genesis_meta', 'tidy_home_genesis_meta' );
/**
* Add widget support for homepage. If no widgets active, display the default loop.
*
*/
<?php
/**
* Plugin Name: Remove H1 Format
* Plugin URI: http://calliaweb.co.uk/modify-tinymce-editor/
* Description: A simple plugin to remove the H1 format from the WordPress TinyMCE editor.
* Version: 0.0.1
* Author: Jo Waltham
* Author URI: http://calliaweb.co.uk/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
@robneu
robneu / gist:10618609
Last active August 29, 2015 13:59 — forked from srikat/gist:10617747
<?php
printf( '<div %s>', genesis_attr( 'site-tagline-left' ) );
printf( '<p %s>%s</p>', genesis_attr( 'site-description' ), esc_html( get_bloginfo( 'description' ) ) );
echo '</div>';
@robneu
robneu / plugin.php
Last active December 30, 2015 19:09 — forked from jeherve/plugin.php
<?php
/**
* An array of Jetpack modules which will be whitelisted.
*
* This whitelist contains a list of all Jetpack modules which we would like users
* to have access to. Anything not listed here will be programmatically disabled.
*
* @author FAT Media, LLC
* @link http://wpbacon.com/disable-jetpack-modules/
@robneu
robneu / gist:7744816
Last active December 29, 2015 23:48 — forked from srikat/gist:7744576
<?php
add_action ( 'genesis_entry_header', 'sk_show_page_excerpt' );
function sk_show_page_excerpt() {
$post = get_post( get_the_ID() );
$the_excerpt = $post->post_excerpt;
if ( ! is_page() || empty( $the_excerpt ) ) {
return;
}
echo $the_excerpt;
<?php
/**
* Functions
*
* @package BE_Genesis_Child
* @since 1.0.0
* @link https://github.com/billerickson/BE-Genesis-Child
* @author Bill Erickson <bill@billerickson.net>
* @copyright Copyright (c) 2011, Bill Erickson
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
<?php
/**
* Template Name: FitFluential Finds Archives
* Description: This is a page template to show the FitFluential Finds CPT
*
* @package FitFluential
* @subpackage Genesis
* @copyright Copyright (c) 2013, WP SIte Care, LLC
* @license GPL-2.0+
* @since 1.0.0
@robneu
robneu / full-content-archives-genesis.php
Last active December 24, 2015 18:29 — forked from srikat/functions.php
Conditionally display the full content on specific categories using the Genesis Framework.
<?php
add_action( 'genesis_before_loop', 'prefix_full_content_specific_categories' );
/**
* Filter the output of specific categories so that they display the full
* content regarldess of what's selected in the Genesis theme options panel.
*
* @author FAT Media <http://youneedfat.com>
* @copyright Copyright (c) 2013, FAT Media, LLC
* @license GPL-2.0+
* @uses is_category <http://codex.wordpress.org/Function_Reference/is_category>