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
// 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
// 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 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
// 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_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
/* Page Widget | |
------------------------------------------------------------ */ | |
.page-widget { | |
line-height: 1.5; | |
padding: 30px; | |
} | |
.page-widget p { | |
margin-bottom: 24px; |
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
genesis_register_sidebar( array( | |
'id' => 'page-widget', | |
'name' => __( 'Page Widget', 'nabm' ), | |
'description' => __( 'This is the widget area for a specific page.', 'nabm' ), | |
) ); |
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 page widget in the content - HTML5 | |
add_action( 'genesis_entry_footer', 'nabm_add_page_content' ); | |
function nabm_add_page_content() { | |
if ( is_page('ID') ) | |
genesis_widget_area ('page-widget', array( | |
'before' => '<div class="page-widget"><div class="wrap">', | |
'after' => '</div></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
//* Add the page widget in the content - XHTML | |
add_action( 'genesis_after_post_content', 'nabm_add_page_content' ); | |
function nabm_add_page_content() { | |
if ( is_page('ID') ) | |
genesis_widget_area ('page-widget', array( | |
'before' => '<div class="page-widget"><div class="wrap">', | |
'after' => '</div></div>', | |
) ); | |
} |