Created
November 18, 2013 20:44
-
-
Save shazdeh/7534976 to your computer and use it in GitHub Desktop.
Enable the right sidebar on single portfolio pages (Parallax)
This file contains hidden or 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 | |
function custom_body_classes( $classes ) { | |
if( is_singular( 'portfolio' ) ) { | |
$id = array_search( 'sidebar-none', $classes ); | |
unset( $classes[$id] ); | |
$classes[] = 'sidebar1'; | |
} | |
return $classes; | |
} | |
add_filter( 'themify_body_classes', 'custom_body_classes' ); | |
function change_portfolio_singular_layout() { | |
global $themify; | |
if( is_singular( 'portfolio' ) ) { | |
$themify->layout = 'sidebar-1'; | |
} | |
} | |
add_action( 'themify_content_after', 'change_portfolio_singular_layout' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment