Created
April 21, 2015 17:40
-
-
Save generatepress/76ade6c6b76e7a608262 to your computer and use it in GitHub Desktop.
Set a sidebar on the blog homepage only
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
add_filter( 'generate_sidebar_layout','generate_custom_blog_sidebar_layout' ); | |
function generate_custom_blog_sidebar_layout( $layout ) | |
{ | |
// If we are on the blog homepage, set the sidebar | |
if ( is_home() ) | |
return 'right-sidebar'; | |
// Or else, set the regular layout | |
return $layout; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment