Skip to content

Instantly share code, notes, and snippets.

@aaronhartland
aaronhartland / genesis-responsive-slider-defaults.php
Last active December 26, 2015 21:29
Setting the Genesis Responsive Slider defaults.
<?php
//* Do NOT include the opening php tag
//* Set Genesis Responsive Slider defaults
add_filter( 'genesis_responsive_slider_settings_defaults', 'latitude_responsive_slider_defaults' );
function latitude_responsive_slider_defaults( $defaults ) {
$args = array(
'posts_num' => '3',
'slideshow_pager' => '',
<?php
/**
* Define color choices for a Genesis Child Theme
* and then set up a way for them to be changed from the
* front end in a theme demo.
*
* @author FAT Media <http://youneedfat.com>
* @copyright Copyright (c) 2013, FAT Media, LLC
* @license GPL-2.0+
*/
<?php
//* Do NOT include the opening php tag
// THis is the code from the home.php file
add_action( 'genesis_after_header', 'enterprise_home_top_helper' );
/**
* Conditionally add Home Top #1 (home-top-1) sidebar and WP-Cycle.
*/
function enterprise_home_top_helper() {
@aaronhartland
aaronhartland / gist:5655161
Created May 27, 2013 04:11
Genesis - add odd/even post class
<?php
//* Add odd/even post class
function sample_oddeven_post_class ( $classes ) {
global $current_class;
$classes[] = $current_class;
$current_class = ($current_class == 'odd') ? 'even' : 'odd';
return $classes;
}
add_filter ( 'post_class' , 'sample_oddeven_post_class' );
@aaronhartland
aaronhartland / gist:3370325
Created August 16, 2012 14:00
404 Page Layout - CellPath
<?php
/**
* CellPath 404 Page Layout
*
* @package CellPath
* @author Aaron Hartland, http://www.aaronhartland.com
* @copyright Copyright (c) 2012, Aaron Hartland
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
*
*/
@aaronhartland
aaronhartland / gist:3288619
Created August 7, 2012 19:26
genesis footer nav
<?php
remove_action( 'genesis_footer', 'genesis_do_footer' );
add_action( 'genesis_footer', 'ah_custom_do_footer' );
function ah_custom_do_footer() {
$creds = 'Copyright &copy; '. date('Y') . ' ' . get_bloginfo('name') . ' . All rights reserved.';
$footernav = wp_nav_menu( array('menu' => 'Footer' ));
echo $footernav;
}
<?php
/** Customize the credits */
add_filter('genesis_footer_creds_text', 'custom_footer_creds_text');
function custom_footer_creds_text() {
echo '<div class="creds"><p>';
echo 'Copyright &copy;';
echo '&nbsp;' . date('Y') ;
echo '&nbsp;' . get_bloginfo('name') ;
echo ' &middot; All Rights Reserved';
@aaronhartland
aaronhartland / sample grid
Created June 24, 2012 19:00
CSS for Structure example grid
/* This is for ths sample grid */
.example-grid {
overflow: hidden;
width: 100%;
}
#inner .column, #inner .columns {
background: #DDD;
height: 25px;
line-height: 25px;
@aaronhartland
aaronhartland / example grid code
Created June 10, 2012 13:19
Code for example grid - Playing with Skeleton
<!-- JS for the example grid -->
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script>
$('.hidden-code').click(function(e) {
e.preventDefault();
$(this).children('.gist').slideToggle();
})
var originalText;
$('.example-grid').children().hover(
@aaronhartland
aaronhartland / gist:2865020
Created June 3, 2012 20:53
breaking stuff - genesis | bootstrap
<?php
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action('genesis_before_header', 'ah_genesis_do_nav');
/**
* Echoes the "Primary Navigation" menu.
*
* The preferred option for creating menus is the Custom Menus feature in
* WordPress. There is also a fallback to using the Genesis wrapper functions
* for creating a menu of Pages, or a menu of Categories (maintained only for