Snippet: Change Layout for LearnDash Courses
// Alter the layout for the courses post type
// Choices: left-sidebar, right-sidebar, full-width or full-screen
add_action( 'wpex_post_layout_class', function() {
if ( is_singular( 'sfwd-courses') ) {
$layout = 'full-width';
}
return $layout;
}, 40 );
All PHP snippets should be added via child theme's functions.php file or via a plugin.
We recommend Code Snippets (100% Free) or WPCode (sponsored)
We recommend Code Snippets (100% Free) or WPCode (sponsored)