Change dinamically the Side-Bar icon
-
Hi
I’ve got change the Side-Bar icon with this change in the style.css
.menu-toggle:before, .navigation-main .widget-handle:before { content: '\f304'; font-family: 'Genericons'; font-size: 2rem; font-weight: bold; text-decoration: none; vertical-align: top; }
Now I would like to show the Genericon ‘\f304’ when the users are logout and shoe the the Genericon ‘\f445’ when the user is login; then I’ve change the file “navigation.php” with this code:
<?php global $user_ID; get_currentuserinfo(); if ('' == $user_ID) { //no user logged in ?> <a class="widget-handle genericon" href="#" title="<?php esc_attr_e( 'Login', 'bushwick' ); ?>"></a> <?php } else { ?> <a class="widget-handle genericon" style="content: '\f445';" href="#" title="<?php esc_attr_e( 'Profile Setting', 'bushwick' ); ?>"></a> <?php } ?>
But the side-bar icons always is the same ‘\f304’… ??
Any idea How could change the Side-Bar icon dinamically?
You can try in this link: LottoGol Club
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Change dinamically the Side-Bar icon’ is closed to new replies.