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
add_action( 'genesis_before_loop', 'sk_excerpts_search_page' ); | |
function sk_excerpts_search_page() { | |
if ( is_search() ) { | |
add_filter( 'genesis_pre_get_option_content_archive', 'sk_show_excerpts' ); | |
} | |
} | |
function sk_show_excerpts() { | |
return 'excerpts'; | |
} |
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
// Remove WP dashboard widgets | |
function nabm_remove_dashboard_widgets() { | |
remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); | |
remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' ); | |
} | |
add_action('wp_dashboard_setup', 'nabm_remove_dashboard_widgets' ); |
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
// Add custom dashboard widget | |
add_action('wp_dashboard_setup', 'nabm_dashboard_widget'); | |
function nabm_dashboard_widget() { | |
global $wp_meta_boxes; | |
wp_add_dashboard_widget('custom_help_widget', 'ADD WIDGET TITLE HERE', 'custom_dashboard_help'); | |
} | |
function custom_dashboard_help() { | |
echo '<p>PLACE YOUR WIDGET CONTENT HERE, INCLUDING HTML.</p>'; | |
} |
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
// Add the newsletter widget after the post content | |
add_action( 'genesis_after_post_content', 'nabm_add_newsletter_box' ); | |
function nabm_add_newsletter_box() { | |
if ( is_singular( 'post' ) ) | |
genesis_widget_area( 'newsletter', array( | |
'before' => '<div id="newsletter">', | |
) ); | |
} | |
genesis_register_sidebar( array( |
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
// Add welcome message before content on homepage | |
add_action( 'genesis_before_loop', 'nabm_welcome_message' ); | |
function nabm_welcome_message() { | |
if ( ! is_home() || get_query_var( 'paged' ) >= 2 ) | |
return; | |
genesis_widget_area( 'welcome-message', array( | |
'before' => '<div class="welcome-message" class="widget-area">', | |
'after' => '</div>', |
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
// Customize Read More text | |
add_filter( 'excerpt_more', 'nabm_more_link' ); | |
add_filter( 'get_the_content_more_link', 'nabm_more_link' ); | |
add_filter( 'the_content_more_link', 'nabm_more_link' ); | |
function nabm_more_link() { | |
return '<a href="' . get_permalink() . '" rel="nofollow"><strong>Continue Reading...</strong></a>'; | |
} |
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
// Enable PHP in widgets | |
add_filter('widget_text','execute_php',100); | |
function execute_php($html){ | |
if(strpos($html,"<"."?php")!==false){ | |
ob_start(); | |
eval("?".">".$html); | |
$html=ob_get_contents(); | |
ob_end_clean(); | |
} | |
return $html; |
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
//* Enable shortcodes in widgets | |
add_filter('widget_text', 'do_shortcode'); |
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
// Remove the edit link | |
add_filter ( 'genesis_edit_post_link' , '__return_false' ); |