Skip to content

Instantly share code, notes, and snippets.

View PittsburghChris's full-sized avatar

Chris Field PittsburghChris

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Can’t Hug Every Cat</title>
<style>
body {
font: 1em/1.5 Cambria, Georgia, serif;
margin: 0 5%;
@surefirewebserv
surefirewebserv / simple-genesis-homepage.php
Last active April 16, 2019 14:22
Simple Homepage Layout for Genesis Framework.
<?php
add_action( 'genesis_after_header', 'sf_featured_slideshow' );
/**
* Add slide show widget area after the header.
*
* @author Sure Fire Web Services
* @link http://surefirewebservices.com/?p=1542
*
* @return Return null if not the homepage post.
*/
@robneu
robneu / functions.php
Last active December 10, 2015 01:18
Add a mobile responsive menu to a Genesis Child Theme - Add to functions.php
<?php
//* Require Child Theme Functions
require_once( CHILD_DIR . '/lib/theme-js.php' );
add_action( 'genesis_header_right', 'prefix_mobile_menu_toggle', 5 );
/**
* Add a mobile menu toggle element
* to expand and collapse a mobile menu.
*
* @author FAT Media
define( 'CHILD_THEME_VERSION', filemtime( get_stylesheet_directory() . '/style.css' ) );
@cdils
cdils / CTA-Widgets.php
Created April 2, 2013 22:57
CTA Widget displays for carriedils.com
/**
* Add CTA widget support for site. If widget not active, don't display
*
*/
function mp_cta_genesis() {
// Don't display the CTA on the home page, since it's built into the MP theme
if ( is_home() ) {
return;
}
<?php
/**
* Handles display of 404 page not found errors.
*
* Custom 404 page not found error template. Exclude Hidden Pages From 404 Page Not Found Error Page.
*
* @category Genesis
* @package Templates
* @author Brad Dalton
* @link http://wpsites.net/web-design/add-content-404-page-genesis/
@media317
media317 / WP Image Size to Media Selection
Last active December 17, 2015 11:38
Add Image Sizes to Media Selection
//** Add image sizes to Media Selection */
add_filter('image_size_names_choose', 'me_display_image_size_names_muploader', 11, 1);
function me_display_image_size_names_muploader( $sizes ) {
$new_sizes = array();
$added_sizes = get_intermediate_image_sizes();
// $added_sizes is an indexed array, therefore need to convert it
// to associative array, using $value for $key and $value
@wpspeak
wpspeak / functions.php
Created June 9, 2013 00:45
Remove Genesis Framework Layouts
<?php
// Remove Genesis layouts
genesis_unregister_layout( 'sidebar-content' );
genesis_unregister_layout( 'content-sidebar-sidebar' );
genesis_unregister_layout( 'sidebar-sidebar-content' );
genesis_unregister_layout( 'sidebar-content-sidebar' );
genesis_unregister_layout( 'content-sidebar' );
genesis_unregister_layout( 'full-width-content' );
@robneu
robneu / style-2.css
Last active December 20, 2015 22:09
Genesis mobile menu styles for Genesis 2.0 and above.
/*
Mobile Menu for Genesis 2.0
Version: 2.0.0
License: GPL-2.0+
License URI: http://www.opensource.org/licenses/gpl-license.php
*/
/* Primary Navigation
--------------------------------------------- */
@brycejacobson
brycejacobson / genesis_remove_shiv.php
Created August 23, 2013 18:00
Remove html5 shiv from Genesis and add Modernizr instead
<?php
//* Do NOT include opening php tag
//* Remove Genesis hmlt5 shiv and add Modernizr instead
remove_action( 'wp_head', 'genesis_html5_ie_fix' );
add_action( 'wp_head', 'add_mondernizr' );
function add_mondernizr() {
if ( ! genesis_html5() )
return;