Skip to content

Instantly share code, notes, and snippets.

@intelliweb
Created October 5, 2013 07:48
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 intelliweb/6838027 to your computer and use it in GitHub Desktop.
Save intelliweb/6838027 to your computer and use it in GitHub Desktop.
Builder: Filter to assign a layout using layout ID
<?php
add_filter('builder_filter_current_layout', 'intw_builder_filter_current_layout');
function intw_builder_filter_current_layout( $layout_id ) {
if ( is_single() && in_category( 'news' ) )
return '4e5f997043d8e';
return $layout_id;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment