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 | |
/** | |
* Default Term Description | |
* | |
*/ | |
function mg_default_term_description( $desc, $term ) { | |
if( ( is_category() || is_tag() || is_tax() ) && empty( $desc ) ) | |
$desc = $term->description; | |
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 | |
/** | |
* Default Category Title in Genesis | |
* | |
* @author Marusca Gabriel | |
*/ | |
function mg_default_category_title( $headline, $term ) { | |
if( ( is_category() || is_tag() || is_tax() ) && empty( $headline ) ) | |
$headline = $term->name; |
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 | |
// HTML5 Hooks | |
add_action( 'genesis_entry_header', 'genesis_do_post_format_image', 4 ); | |
add_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 ); | |
add_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 ); | |
add_action( 'genesis_entry_header', 'genesis_do_post_title' ); | |
add_action( 'genesis_entry_header', 'genesis_post_info', 12 ); | |
add_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); | |
add_action( 'genesis_entry_content', 'genesis_do_post_content' ); |
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_after_header','relocate_entry_title_singular' ); | |
function relocate_entry_title_singular() { | |
if ( ! is_singular() ) | |
return; | |
echo '<div class="entry-header-wrapper"><div class="wrap">'; | |
genesis_do_post_title(); | |
echo '</div></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 | |
remove_action( 'genesis_after_header', 'genesis_do_subnav' ); | |
add_action( 'genesis_before_footer', 'genesis_do_subnav', 5 ); |
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 | |
// Remove the schema markup from an element | |
function mg_schema_empty( $attr ) { | |
$attr['itemtype'] = ''; | |
$attr['itemprop'] = ''; | |
$attr['itemscope'] = ''; | |
return $attr; | |
} |
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 | |
/* | |
Plugin Name: Site Plugin for site.com | |
Description: Site specific code changes for site.com | |
*/ | |
/* Start Adding Functions Below this Line */ | |
/* Stop Adding Functions Below this Line */ | |
?> |
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_endwhile', 'genesis_posts_nav' ); |
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_filter( 'genesis_attr_entry', 'prefix_attributes_entry_content', 15 ); | |
function prefix_attributes_entry_content( $attributes ) { | |
unset( $attributes['class'] ); | |
unset( $attributes['itemprop'] ); | |
unset( $attributes['itemtype'] ); | |
unset( $attributes['itemscope'] ); | |
//* Blog posts microdata | |
if ( 'post' === get_post_type() ) { | |
$attributes['class'] = join( ' ', get_post_class() ); |
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
/* Customize tag cloud widget*/ | |
function my_tag_text_callback( $count ) { | |
return sprintf( _n('%s Articles', '%s Articles', $count), number_format_i18n( $count ) ); | |
} | |
add_filter('widget_tag_cloud_args','set_number_tags'); | |
function set_number_tags($args) { | |
$args = array('smallest' => 11, 'largest' => 11, 'number' => 30, 'orderby' => 'count','order' => 'DESC', 'topic_count_text_callback' => 'my_tag_text_callback' ); | |
return $args; | |
} |
OlderNewer