Skip to content

Instantly share code, notes, and snippets.

remove_action( 'genesis_header', 'genesis_do_header' );
add_action( 'genesis_header', 'adam_genesis_do_header' );
function adam_genesis_do_header() {
global $wp_registered_sidebars;
genesis_markup( array(
'html5' => '<div %s>',
@cosmocanuck
cosmocanuck / code
Created December 16, 2013 22:02
"Recent Work" section of theme's homepage.
<?php if ( get_option('evolution_display_recentwork_section') == 'on' ) { ?>
<div id="recent-work" class="clearfix">
<div id="work-info">
<h3><?php esc_html_e('Recent Work','Evolution'); ?></h3>
<p><?php echo get_option('evolution_homework_desc'); ?></p>
</div> <!-- end #work-info -->
<?php
$work_count = 0;
$recent_exlcats_work = get_option('evolution_exlcats_work');
@cosmocanuck
cosmocanuck / gist:7966513
Created December 14, 2013 23:35
adaptive-metabox.php
<?php
/*
Title: Adaptive Snow Sports
Post Type: e2s_adaptive
context: normal
priority: high
*/
piklist('field', array(
'type' => 'text',
@cosmocanuck
cosmocanuck / gist:7966275
Last active December 31, 2015 09:19
Code I'm using to add custom post type
add_filter('piklist_post_types', 'adaptive_post_type');
function adaptive_post_type($post_types)
{
$post_types['e2s_adaptive'] = array(
'labels' => piklist('post_type_labels', 'Adaptive Resource'),
'title' => __('Enter Custom Title'),
'public' => true,
'capability_type' => 'post',
'rewrite' => array(
'slug' => 'e2s_adaptive'