Skip to content

Instantly share code, notes, and snippets.

@bradpotter
bradpotter / responsivemenus.js
Last active December 23, 2015 16:49
Test to see if it works
jQuery(document).ready(function($) {
$("#menu-header-navigation").before('<div id="header-menu-icon"></div>');
$("#header-menu-icon").click(function() {
$("#menu-header-navigation").slideToggle();
});
$("#menu-primary-navigation").before('<div id="primary-menu-icon"></div>');
$("#primary-menu-icon").click(function() {
$(".menu-primary").slideToggle();
@bradpotter
bradpotter / functions.php
Last active December 23, 2015 03:39
Change attributes for home page content element
add_filter( 'genesis_attr_content', 'bp_attributes_content' );
/**
* Change attributes for home page main content element.
*
*/
function bp_attributes_content( $attributes ) {
//* Home page main content microdata
if ( is_home() ) {
$attributes['itemtype'] = 'http://schema.org/Blog';
@bradpotter
bradpotter / style.css
Last active December 22, 2015 03:09
Home Top CSS
/*
Home Top (These styles go above Media Queries)
---------------------------------------------------------------------------------------------------- */
.home-top {
background: #fff;
height: 500px;
height: 50rem;
max-width: 1140px;
margin: 120px auto 60px;
@bradpotter
bradpotter / front-page.php
Last active December 22, 2015 03:08
Add Home Top widgetized area in front-page.php
//* Add Home Top widgetized area
add_action( 'genesis_after_header', 'minimum_home_top', 5 );
function minimum_home_top() {
printf( '<div %s>', genesis_attr( 'home-top' ) );
genesis_structural_wrap( 'home-top' );
genesis_widget_area( 'home-top-full', array(
'before'=> '<div class="home-top-full widget-area">',
'after' => '</div>',
@bradpotter
bradpotter / functions.php
Last active December 22, 2015 03:08
register widget area for home top
genesis_register_sidebar( array(
'id' => 'home-top-full',
'name' => __( 'Home Top', 'minimum' ),
'description' => __( 'This is the home top section.', 'minimum' ),
) );
@bradpotter
bradpotter / functions.php
Created August 12, 2013 05:43
Enqueue Header Menu Script
/**
* Register and Enqueue Header Navigation Menu Script
*
* @author Brad Potter
*
* @link http://www.bradpotter.com
*/
function gst_headermenu_script() {
wp_register_script( 'header-menu', get_stylesheet_directory_uri() . '/js/headermenu.js', array('jquery'), '1.0.0', false );
@bradpotter
bradpotter / headermenu.js
Created August 12, 2013 05:29
jQuery script for Header Navigation Menu
jQuery(document).ready(function($) {
$("#menu-header-navigation").before('<div id="header-menu-icon"></div>');
$("#header-menu-icon").click(function() {
$("#menu-header-navigation").slideToggle();
});
$(window).resize(function(){
if(window.innerWidth > 768) {
$("#menu-header-navigation").removeAttr("style");
}
@bradpotter
bradpotter / headernav.css
Last active December 20, 2015 22:58
Media Query CSS for Header Navigation
/* Header Navigation Menu Icon properties */
#header-menu-icon {
border-bottom: 1px solid #ddd;
border-top: 1px solid #ddd;
cursor: pointer;
display: block;
padding: 24px 24px;
padding: 2.4rem 2.4rem;
text-align: center;
@bradpotter
bradpotter / secondarynav.css
Last active December 20, 2015 22:09
Media Query CSS for Secondary Navigation
/* Secondary Navigation Menu Icon properties */
#secondary-menu-icon {
border-bottom: 1px solid #ddd;
cursor: pointer;
display: block;
padding: 24px 24px;
padding: 2.4rem 2.4rem;
text-align: center;
}
@bradpotter
bradpotter / secondarymenu.js
Created August 11, 2013 01:07
jQuery script for Secondary Navigation Menu
jQuery(document).ready(function($) {
$("#menu-secondary-navigation").before('<div id="secondary-menu-icon"></div>');
$("#secondary-menu-icon").click(function() {
$(".menu-secondary").slideToggle();
});
$(window).resize(function(){
if(window.innerWidth > 768) {
$(".menu-secondary").removeAttr("style");
}