Skip to content

Instantly share code, notes, and snippets.

View PittsburghChris's full-sized avatar

Chris Field PittsburghChris

View GitHub Profile
@rickrduncan
rickrduncan / genesis-page-titles-html5.php
Last active August 1, 2022 11:16
How to remove page titles from Genesis child themes using XHTML and HTML5 methods.
<?php
//* Do NOT include the opening php tag
//* ALL EXAMPLES ON THIS PAGE USE THE NEW HTML5 METHOD
//* Remove page titles site wide (posts & pages) (requires HTML5 theme support)
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
@ozzyrod
ozzyrod / responsive-menu-css.css
Last active April 23, 2019 05:54
Creates a mobile responsive menu in a Genesis child theme with support for collapsible sub menus.
/* Responsive Navigation
---------------------------------------------------------------------------------------------------- */
/* Standard Navigation
--------------------------------------------- */
nav {
clear: both;
}
@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.
*/
@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' );
<?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/
@studiopress
studiopress / functions.php
Last active May 23, 2017 07:17
Load Google Fonts.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Enqueue Lato Google font
add_action( 'wp_enqueue_scripts', 'sp_load_google_fonts' );
function sp_load_google_fonts() {
wp_enqueue_style( 'google-font-lato', '//fonts.googleapis.com/css?family=Lato:300,700', array(), CHILD_THEME_VERSION );
}
<!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%;
@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;
jQuery(document).ready(function($) {
$("body").show();
$( "#accordion" ).accordion({
collapsible: true,
active: false,
header: '> div.my-accordion-section > h3',
heightStyle: 'content'
});
});
genesis_register_sidebar( array(
'id' => 'home-bkgrd-image',
'name' => __( 'Home Background Image', 'minimum' ),
'description' => __( 'Widgets placed here will appear on top of home background image.', 'minimum' ),
) );
//* Add overlay div below home slider
add_action( 'genesis_after_header', 'minimum_home_bkgrd_image_overlay', 9 );
function minimum_home_bkgrd_image_overlay() {