Created
October 29, 2014 12:29
-
-
Save matheusgimenez/443016a0faaa0ec3e2b3 to your computer and use it in GitHub Desktop.
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
<?php | |
//functions.php | |
register_sidebar( array( | |
'id' => 'sidebar_login', | |
'name' => 'Sidebar para Usuarios logados', | |
) ); | |
?> | |
<?php | |
// no arquivo de template onde deseja que fique o sidebar | |
?> | |
<?php if ( is_active_sidebar( 'sidebar_login' ) && is_user_logged_in() ) : ?> | |
<?php dynamic_sidebar( 'sidebar_login' ); ?> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment