Created
March 18, 2013 13:40
-
-
Save jmariano13/5187200 to your computer and use it in GitHub Desktop.
Genesis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add new image sizes | |
add_image_size( 'homepage', 120, 120, TRUE ); | |
add_image_size( 'small', 80, 80, TRUE ); | |
add_image_size( 'portfolio', 340, 230, TRUE ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Layout.php | |
add_action( 'genesis_init', 'genesis_create_initial_layouts', 0 ); | |
Feed.php | |
add_filter( 'feed_link', 'genesis_feed_links_filter', 10, 2 ); | |
add_action( 'template_redirect', 'genesis_feed_redirect' ); | |
Options.php | |
add_filter( 'get_term', 'genesis_get_term_filter', 10, 2 ); | |
//SEO.php | |
add_action( 'after_setup_theme', 'genesis_seo_compatibility_check', 5 ); | |
add_action( 'admin_notices', 'genesis_scribe_nag' ); | |
add_action( 'admin_init', 'genesis_disable_scribe_nag' ); | |
Upgrade.php | |
add_action( 'admin_init', 'genesis_upgrade', 20 ); | |
add_action( 'genesis_upgrade', 'genesis_upgrade_redirect' ); | |
add_action( 'admin_notices', 'genesis_upgraded_notice' ); | |
add_filter( 'update_theme_complete_actions', 'genesis_update_action_links', 10, 2 ); | |
add_action( 'admin_notices', 'genesis_update_nag' ); | |
add_action( 'init', 'genesis_update_email' ); | |
add_filter( 'site_transient_update_themes', 'genesis_update_push' ); | |
add_filter( 'transient_update_themes', 'genesis_update_push' ); | |
add_action( 'load-update-core.php', 'genesis_clear_update_transient' ); | |
add_action( 'load-themes.php', 'genesis_clear_update_transient' ); | |
Widgetize.php | |
add_action( 'genesis_setup', 'genesis_register_default_widget_areas' ); | |
add_action( 'after_setup_theme', 'genesis_register_footer_widget_areas' ); | |
//Structure | |
//Archive.php | |
add_filter( 'genesis_term_intro_text_output', 'wpautop' ); | |
add_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 ); | |
add_filter( 'genesis_author_intro_text_output', 'wpautop' ); | |
add_action( 'genesis_before_loop', 'genesis_do_author_title_description', 15 ); | |
add_action( 'genesis_before_loop', 'genesis_do_author_box_archive', 15 ); | |
//Comments.php | |
add_action( 'genesis_after_post', 'genesis_get_comments_template' ); | |
add_action( 'genesis_comments', 'genesis_do_comments' ); | |
add_action( 'genesis_pings', 'genesis_do_pings' ); | |
add_action( 'genesis_list_comments', 'genesis_default_list_comments' ); | |
add_action( 'genesis_comment_form', 'genesis_do_comment_form' ); | |
add_filter( 'comment_form_defaults', 'genesis_comment_form_args' ); | |
//Footer.php | |
add_action( 'genesis_before_footer', 'genesis_footer_widget_areas' ); | |
add_action( 'genesis_footer', 'genesis_footer_markup_open', 5 ); | |
add_action( 'genesis_footer', 'genesis_footer_markup_close', 15 ); | |
add_filter( 'genesis_footer_output', 'do_shortcode', 20 ); | |
add_action( 'genesis_footer', 'genesis_do_footer' ); | |
add_filter( 'genesis_footer_scripts', 'do_shortcode' ); | |
add_action( 'wp_footer', 'genesis_footer_scripts' ); | |
//header.php | |
add_action( 'genesis_doctype', 'genesis_do_doctype' ); | |
add_action( 'get_header', 'genesis_doc_head_control' ); | |
add_action( 'genesis_site_title', 'genesis_seo_site_title' ); | |
add_action( 'genesis_site_description', 'genesis_seo_site_description' ); | |
add_filter( 'wp_title', 'genesis_doctitle_wrap', 20 ); | |
add_action( 'genesis_title', 'wp_title' ); | |
add_filter( 'wp_title', 'genesis_default_title', 10, 3 ); | |
add_action( 'genesis_meta', 'genesis_seo_meta_description' ); | |
add_action( 'genesis_meta', 'genesis_seo_meta_keywords' ); | |
add_action( 'genesis_meta', 'genesis_robots_meta' ); | |
add_action( 'genesis_meta', 'genesis_show_theme_info_in_head' ); | |
add_action( 'wp_head', 'genesis_do_meta_pingback' ); | |
add_action( 'wp_head', 'genesis_canonical', 5 ); | |
add_action( 'wp_head', 'genesis_rel_author' ); | |
add_action( 'genesis_meta', 'genesis_load_favicon' ); | |
add_filter( 'genesis_header_scripts', 'do_shortcode' ); | |
add_action( 'wp_head', 'genesis_header_scripts' ); | |
add_action( 'after_setup_theme', 'genesis_custom_header' ); | |
add_action( 'genesis_header', 'genesis_header_markup_close', 15 ); | |
add_action( 'genesis_header', 'genesis_do_header' ); | |
//Layout.php | |
add_filter( 'content_width', 'genesis_content_width', 10, 3 ); | |
add_filter( 'body_class', 'genesis_custom_body_class', 15 ); | |
add_filter( 'body_class', 'genesis_header_body_classes' ); | |
add_filter( 'body_class', 'genesis_layout_body_classes' ); | |
add_filter( 'body_class', 'genesis_style_selector_body_classes' ); | |
add_action( 'genesis_after_content', 'genesis_get_sidebar' ); | |
add_action( 'genesis_after_content_sidebar_wrap', 'genesis_get_sidebar_alt' ); | |
//Loop.php | |
add_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'after_setup_theme', 'genesis_register_nav_menus' ); | |
add_action( 'genesis_after_header', 'genesis_do_nav' ); | |
add_action( 'genesis_after_header', 'genesis_do_subnav' ); | |
add_filter( 'wp_nav_menu_items', 'genesis_nav_right', 10, 2 ); | |
add_filter( 'post_class', 'genesis_entry_post_class' ); | |
add_filter( 'post_class', 'genesis_custom_post_class', 15 ); | |
add_action( 'genesis_before_post_title', 'genesis_do_post_format_image' ); | |
add_action( 'genesis_post_title', 'genesis_do_post_title' ); | |
add_action( 'genesis_post_content', 'genesis_do_post_image' ); | |
add_action( 'genesis_post_content', 'genesis_do_post_content' ); | |
add_action( 'genesis_loop_else', 'genesis_do_noposts' ); | |
add_filter( 'genesis_post_info', 'do_shortcode', 20 ); | |
add_action( 'genesis_before_post_content', 'genesis_post_info' ); | |
add_filter( 'genesis_post_meta', 'do_shortcode', 20 ); | |
add_action( 'genesis_after_post_content', 'genesis_post_meta' ); | |
add_action( 'genesis_after_post', 'genesis_do_author_box_single' ); | |
add_action( 'genesis_after_endwhile', 'genesis_posts_nav' ); | |
//Search.php | |
add_filter( 'get_search_form', 'genesis_search_form' ); | |
//Sidebar.php | |
add_action( 'genesis_sidebar', 'genesis_do_sidebar' ); | |
add_action( 'genesis_sidebar_alt', 'genesis_do_sidebar_alt' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remove_action( 'genesis_after_post_content', 'genesis_post_meta', 10 ); | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_before_loop', 'wp_cycle' ); | |
add_action( 'genesis_loop', 'child_home_loop_helper' ); | |
/** | |
* Add Widgets and WP-Cycle to home.php. | |
* | |
* @author Greg Rickaby | |
* @since 1.0.0 | |
*/ | |
function child_home_loop_helper() { ?> | |
<div id="homepage_widgets"> | |
<div class="column1"> | |
<ul> | |
<?php if ( !function_exists( 'dynamic_sidebar' ) || !dynamic_sidebar( 'Home 1' ) ){ ?><?php } ?> | |
</ul> | |
</div> | |
<div class="column2"> | |
<ul> | |
<?php if ( !function_exists( 'dynamic_sidebar' ) || !dynamic_sidebar( 'Home 2' ) ){ ?><?php } ?> | |
</ul> | |
</div> | |
</div> | |
<?php } | |
genesis(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class='one-half first'></div> | |
<div class='one-third second'></div> | |
<div class='one-fourth third'></div> | |
<div class='one-fifth fourth'></div> | |
<div class='one-sixth fifth'></div> | |
http://www.billerickson.net/ | |
.five-sixths, | |
.four-fifths, | |
.four-sixths, | |
.one-fifth, | |
.one-fourth, | |
.one-half, | |
.one-sixth, | |
.one-third, | |
.three-fifths, | |
.three-fourths, | |
.three-sixths, | |
.two-fifths, | |
.two-fourths, | |
.two-sixths, | |
.two-thirds { | |
float: left; | |
margin-left: 3%; | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
.one-half, | |
.three-sixths, | |
.two-fourths { | |
width: 48%; | |
} | |
.one-third, | |
.two-sixths { | |
width: 31%; | |
} | |
.four-sixths, | |
.two-thirds { | |
width: 65%; | |
} | |
.one-fourth { | |
width: 22.5%; | |
} | |
.three-fourths { | |
width: 73.5%; | |
} | |
.one-fifth { | |
width: 17.4%; | |
} | |
.two-fifths { | |
width: 37.8%; | |
} | |
.three-fifths { | |
width: 58.2%; | |
} | |
.four-fifths { | |
width: 78.6%; | |
} | |
.one-sixth { | |
width: 14%; | |
} | |
.five-sixths { | |
width: 82%; | |
} | |
.first { | |
clear: both; | |
margin-left: 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//This is inside function.php | |
//This will call genesis-box.php inside the child theme (a simple html skeleton) | |
add_action('genesis_after_post_content','include_genesis_box', 9); | |
function include_genesis_box(){ | |
if ( is_single()) require(CHILD_DIR.'/genesis-box.php'); | |
} | |
//genesis-box.php | |
<div id="genesis-box"> | |
<h3>Powered by the Genesis Framework</h3> | |
<a href="http://www.studiopress.com/"><img class="alignright" src="http://www.briangardner.com/wp-content/uploads/genesis.jpg" alt="Genesis Framework" title="Genesis Framework" /></a> | |
<p>Genesis empowers you to easily build amazing websites with WordPress. Whether you're a novice or advanced developer, Genesis provides the secure and search-engine-optimized foundation that takes WordPress to incredible places.</p> | |
<p><a href="http://www.studiopress.com/">It's that simple - start using Genesis now!</a></p> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_theme_support( 'post-formats', array( | |
'aside', | |
'audio', | |
'chat', | |
'gallery', | |
'image', | |
'link', | |
'quote', | |
'status', | |
'video' | |
) ); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'genesis_before_post', 'humphrey_remove_elements' ); | |
function humphrey_remove_elements() { | |
if ( ! current_theme_supports( 'post-formats' ) ) | |
return; | |
// Remove if post has format | |
if ( get_post_format() ) { | |
remove_action( 'genesis_post_title', 'genesis_do_post_title' ); | |
remove_action( 'genesis_before_post_content', 'genesis_post_info' ); | |
remove_action( 'genesis_after_post_content', 'genesis_post_meta' ); | |
} | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add div.wrap inside of div#inner | |
function child_before_content_sidebar_wrap() { | |
echo '<div class="wrap">'; | |
} | |
add_action('genesis_before_content_sidebar_wrap', 'child_before_content_sidebar_wrap'); | |
function child_after_content_sidebar_wrap() { | |
echo '</div><!-- end .wrap -->'; | |
} | |
add_action('genesis_after_content_sidebar_wrap', 'child_after_content_sidebar_wrap'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment