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 | |
//* Display Featured Image floated to the left in single Posts. | |
add_action( 'genesis_entry_content', 'md_show_featured_image_single_posts', 9 ); | |
function md_show_featured_image_single_posts() { | |
if ( ! is_singular( array( 'post') )) { | |
return; | |
} | |
$image_args = array( | |
'size' => 'medium', |
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 | |
//* Unregister content/sidebar layout setting | |
genesis_unregister_layout( 'content-sidebar' ); | |
//* Unregister sidebar/content layout setting | |
genesis_unregister_layout( 'sidebar-content' ); | |
//* Unregister content/sidebar/sidebar layout setting | |
genesis_unregister_layout( 'content-sidebar-sidebar' ); | |
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 titles on pages only | |
function remove_page_titles_genesis() { | |
if ( is_page() && !is_archive() && !is_page_template('page_blog.php') || $post->post_parent ) { | |
remove_action('genesis_entry_header', 'genesis_do_post_title'); | |
}} | |
add_action ('get_header', 'remove_page_titles_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 | |
function add_category_name($classes = '') { | |
if(is_single()) { | |
$category = get_the_category(); | |
$classes[] = 'category-'.$category[0]->slug; | |
} | |
return $classes; | |
} | |
add_filter('body_class','add_category_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 | |
add_action('admin_head', 'md_custom_user_panel'); | |
function md_custom_user_panel() { | |
global $current_user; | |
get_currentuserinfo(); | |
if ( USER ID == $current_user->ID ) { | |
echo '<style> | |
YOUR CUSTOM ADMIN STYLES HERE |
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 | |
// * Relocate titles on Page, Post and other single pages | |
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(); | |
genesis_post_info(); |
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 | |
function md_filter_plugin_updates( $value ) { | |
if( isset( $value->response[ plugin_basename(__FILE__) ] ) ) | |
unset( $value->response[ plugin_basename(__FILE__) ] ); //Duplicator | |
return $value; | |
} | |
add_filter( 'site_transient_update_plugins', 'md_filter_plugin_updates' ); | |
?> |
OlderNewer