Skip to content

Instantly share code, notes, and snippets.

@reasonstousegenesis
Created October 28, 2015 02:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reasonstousegenesis/7f98d9d415c744311cdf to your computer and use it in GitHub Desktop.
Save reasonstousegenesis/7f98d9d415c744311cdf to your computer and use it in GitHub Desktop.
Retrieve the current layout option with Genesis
<?php
// Paste the code BELOW this line into your child theme functions.
/**
* Retrieve the current layout option with Genesis
*
* @author Reasons to Use Genesis
* @link http://reasonstousegenesis.com/get-layout/
*/
add_action( 'wp_head', 'rtug_site_layout_post_info' );
function rtug_site_layout_post_info() {
if ( 'full-width-content' === genesis_site_layout() )
add_filter( 'genesis_post_info', '__return_false' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment