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 | |
//* Don't include the opening php tag | |
//* Filter the footer credits | |
add_filter( 'genesis_footer_creds_text', 'prefix_footer_creds_text' ); | |
function prefix_footer_creds_text( $args ) { | |
$args = '[footer_copyright] ' . get_bloginfo( 'name' ) . '<br/>Website handcrafted with love by Your Name'; | |
return $args; | |
} |
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 | |
//* Don't include the opening php tag | |
//* Display a widget area before the footer | |
add_action( 'genesis_before_footer', 'prefix_show_your_widget_area' ); | |
function prefix_show_your_widget_area () { | |
genesis_widget_area( 'your-widget-area', array( | |
'before' => '<div>', // markup before the widget | |
'after' => '</div>', // markup after the widget | |
) ); |
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 | |
//* Don't include the opening php tag | |
//* Display a widget area | |
genesis_widget_area( 'your-widget-area', array( | |
'before' => '<div>', // markup before the widget | |
'after' => '</div>', // markup after the widget | |
) ); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
//* Do not include the opening php tag | |
//* Remove the link from titles | |
add_filter( 'genesis_post_title_output', 'prefix_custom_post_title' ); | |
function prefix_custom_post_title( $title ) { | |
if ( is_post_type_archive( 'post' ) ) { | |
$post_title = get_the_title( get_the_ID() ); | |
$title = '<h2 class="entry-title" itemprop="headline">' . $post_title . '</h2>'; | |
} |
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 | |
//* Do not include the opening php tag | |
//* Remove the link from titles | |
add_filter( 'genesis_post_title_output', 'prefix_custom_post_title' ); | |
function prefix_custom_post_title( $title ) { | |
$post_title = get_the_title( get_the_ID() ); | |
$title = '<h2 class="entry-title" itemprop="headline">' . $post_title . '</h2>'; | |
return $title; |
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 | |
//* Do not include the opening php tag | |
//* Force full-width-content | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); | |
//* Force content-sidebar | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' ); | |
//* Force sidebar-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 | |
//* Do not include the opening php tag | |
//* Unregister the primary sidebar | |
unregister_sidebar( 'sidebar' ); | |
//* Unregister the secondary sidebar | |
unregister_sidebar( 'sidebar-alt' ); |
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 | |
//* Don't include the opening php tag | |
/** | |
* Add an 'envira' shortcode to all default WordPress galleries | |
*/ | |
add_shortcode( 'gallery', 'prefix_envira_to_gallery_shortcode' ); | |
function prefix_envira_to_gallery_shortcode( $atts ) { | |
$atts[ 'envira'] = 'true'; | |
return gallery_shortcode( $atts ); |
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
/** | |
* Assign the sidebars | |
*/ | |
add_action( 'genesis_header','rb_change_genesis_sidebar' ); | |
function rb_change_genesis_sidebar() { | |
global $post; | |
if ( get_post_type() == 'post' ) { // Check if we're on a single post for the 'post' post type | |
remove_action( 'genesis_sidebar', 'genesis_do_sidebar'); // remove the default genesis sidebar |