Horje
Admin Bar Interference With My Fixed Nav - Wordpress Solution
Here's my dilemma, I want to keep the wordpress admin bar because I want my users to have easy access to posting stories and I'm putting custom links in the admin bar as well for them as well, but I also have a fixed nav which looks great when users aren't logged in but when they're logged in... It looks like this: http://screencast.com/t/6jML7HIhg1 Is there anything I can add to my CSS and/or header file to keep this from happening. I like where the nav is currently and don't want to move it to the top above my logo. My website is http://bit.ly/1prvicW so that you can see how the header looks when a user isn't logged in to compare. Thanks for your help.

Solution - 1

Hello Brennen when the admin bar is shown in the front end, the body tag will accompany with class called logged in. you can use that class to control the layout. eg: body.admin-bar /*additional class goes here */ { } that can control the layout of the site. can you create a subscriber login for me and PM me the detail. so that I can give the exact class. or can you give me the exact theme name and link for the theme.


Solution - 2

Add the next CSS code

#wpadminbar{top: 160px !important;}
good luck


Solution - 3

i think this.. #wpadminbar{top: 95px !important;}


Solution - 4

If after loggin in your body class contain "logged-in" then following might work.


.logged-in #header-nav{
 top:142px;
}
above code should be added at after this code

#header-nav {
    z-index: 999999;
    top: 110px;
    width: 100%;
   background:#1d1d1d;
}
at line no. 3043 If body tag do not contain class "logged-in" then add following code in your theme's functions.php file

add_action('wp_head','bob_hook_css');

function bob_hook_css()
{
if( is_user_logged_in() ){
    $output="<style> #header-nav{ top:142px !important;} </style>";
    echo $output;
}// if over

}//function over





Wordpress

Related
CMB metaboxes show_on filter - Wordpress Solution CMB metaboxes show_on filter - Wordpress Solution
Looking for good streaming services - Wordpress Solution Looking for good streaming services - Wordpress Solution
Responsive design - Wordpress Solution Responsive design - Wordpress Solution
Create Hook from WP User Frontend to WP Event Organiser - Wordpress Solution Create Hook from WP User Frontend to WP Event Organiser - Wordpress Solution
Css selector idea, using both pseudo class & element - Wordpress Solution Css selector idea, using both pseudo class & element - Wordpress Solution

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7