Created
April 1, 2018 23:50
-
-
Save damiencarbery/fdca64a50a4525e416514b884f9b1982 to your computer and use it in GitHub Desktop.
Genesis Snippets - short code snippets that I use in my Genesis based websites. https://www.damiencarbery.com/2018/04/genesis-snippets/
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 | |
// These can be used in a template file where a template function, like is_page(), isn't needed. | |
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' ); | |
add_filter( 'genesis_site_layout', '__genesis_return_content_sidebar' ); | |
add_filter( 'genesis_site_layout', '__genesis_return_sidebar_content' ); | |
add_filter( 'genesis_site_layout', '__genesis_return_content_sidebar_sidebar' ); | |
add_filter( 'genesis_site_layout', '__genesis_return_sidebar_sidebar_content' ); | |
add_filter( 'genesis_site_layout', '__genesis_return_sidebar_content_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 | |
// Make pages full width | |
add_filter( 'genesis_site_layout', 'dcwd_full_width_page' ); | |
function dcwd_full_width_page( $layout ) { | |
if ( is_page() ) { | |
return 'full-width-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 | |
// No Edit link at bottom of post/page. | |
add_filter('genesis_edit_post_link', '__return_false' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment