This file contains hidden or 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 | |
//* 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; |
This file contains hidden or 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 | |
//* Do NOT include opening php tag | |
function genesis_standard_loop() { | |
//** Use old loop hook structure if < HTML5 | |
if ( ! genesis_html5() ) { | |
genesis_legacy_loop(); | |
return; | |
} |
This file contains hidden or 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 | |
//* do not include php tag | |
add_filter( 'genesis_attr_content', 'custom_add_content_attr' ); | |
function custom_add_content_attr( $attributes ){ | |
// add itemscope | |
$attributes['class'] = 'content first two-thirds'; | |
This file contains hidden or 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_filter( 'genesis_attr_movie', 'custom_add_movie_attr' ); | |
/** | |
* Callback for dynamic Genesis 'genesis_attr_$context' filter. | |
* | |
* Add custom attributes for the custom filter. | |
* | |
* @param array $attributes The element attributes | |
* @return array $attributes The element attributes |
This file contains hidden or 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
<li><strong>Category:</strong> <?php $terms_as_text = get_the_term_list( $post->ID,'gallery_category', '', ', '); | |
if (!empty($terms_as_text)) echo '', strip_tags($terms_as_text) ,''; ?></li> |
This file contains hidden or 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 | |
//* Get images attached to post and make a slider | |
add_action( 'genesis_after_header', 'scw_gallery_slider', 2 ); | |
function scw_gallery_slider() { | |
soliloquy_dynamic( array( 'id' => get_the_ID() ) ); | |
} |
This file contains hidden or 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 | |
$taxonomy_name = get_queried_object()->name; // Get the name of the taxonomy | |
$term_id = get_queried_object_id(); // Get the id of the taxonomy | |
$termchildren = get_term_children( $term_id, $taxonomy_name ); // Get the children of said taxonomy | |
// Display the children | |
echo '<tr>'; | |
foreach ( $termchildren as $child ) { | |
$term = get_term_by( 'id', $child, $taxonomy_name ); |
This file contains hidden or 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
// Move image above post title in Genesis Framework 2.0 | |
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); | |
add_action( 'genesis_entry_header', 'genesis_do_post_image', 8 ); |
This file contains hidden or 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 | |
// Move Gravity Forms jQuery calls to footer | |
add_filter("gform_init_scripts_footer", "init_scripts"); | |
function init_scripts() { | |
return true; | |
} | |
?> |
This file contains hidden or 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_entry_content', 'nutrition_facts', 15 ); | |
function nutrition_facts() { | |
if ( get_post_meta( get_the_ID(), 'nutrition_facts_image', true ) ) : ?> | |
<p class="nutrition-facts"><?php echo pods_image( get_post_meta( get_the_ID(), 'nutrition_facts_image', true ), 'full' ); ?></p> | |
<?php endif; | |
} |