You can try this code with add in functions.php
file of your current’s theme:
add_action('wp_head', 'my_wp_head');
function my_wp_head(){
echo '<style>'
.PHP_EOL
.'body{ padding-top: 70px !important; }'
.PHP_EOL
.'body.body-logged-in .navbar-fixed-top{ top: 46px !important; }'
.PHP_EOL
.'body.logged-in .navbar-fixed-top{ top: 46px !important; }'
.PHP_EOL
.'@media only screen and (min-width: 783px) {'
.PHP_EOL
.'body{ padding-top: 70px !important; }'
.PHP_EOL
.'body.body-logged-in .navbar-fixed-top{ top: 28px !important; }'
.PHP_EOL
.'body.logged-in .navbar-fixed-top{ top: 28px !important; }'
.PHP_EOL
.'}</style>'
.PHP_EOL;
}
Related Posts:
- Add custom classes to anchor in wp_nav_menu
- Displaying wp menus by name without using theme locations
- Setting a Default ‘Theme Location’ When Creating a Menu
- How to make navigation a list without a plugin? [duplicate]
- wp_nav_menu(), how to change class?
- How to add menu support to a theme?
- Select menu on browser resize
- Extend walker – navigation, adding data attribute to a tag
- How to highlight the current page in the nav menu?
- how to change WordPress menu markup/classes
- Custom Nav Walker Displaying Values in Sub Menu
- Where is definied the theme location for the main menu in a WordPress template?
- WordPress is adding margins and padding to my custom menu?
- How to make theme elements customizable in wordpress?
- Primary navigation menu & footer not showing in category / tag page
- Using a page as home, how do I prevent nav from setting both home and page links active?
- Where am I doing wrong in my theme menu?
- Admin: sub menu doesnt display under apperance when activate my themes
- 3 Level Deep Navigation Menu Not Showing All Levels
- How to add menù section to my WordPress template?
- Thesis -style Navigation
- how do i develop a global nav and local nav to be wordpress dynamic?
- Why is my container argument not working for wp_nav_menu() [closed]
- Some doubts about WordPress handle the horizontal main menu visualization
- Custom nav menu not showing
- how to create/register menu items that can be added to menus later
- Why nav_menu_css_class doesn’t work with apply_filters?
- Programatically Created Menu not Editable in Dashboard
- 3 Level Menu Navigation (3rd Level not displaying)
- Theme: dropdown hover menu not showing up in IE/Edge
- How can I show a custom WordPress menu anywhere I want on my website?
- Show all menu levels except top level. How to exclude top level of a menu?
- WordPress Menu item > Sub menu Class update
- Menu names not getting translated
- Need help with adding custom wordpress menu and sub-menu
- How to achieve this navigation style in wordpress navigation
- Fallback dosen’t work when not using ‘menu’ attribute
- Primary Menu Showing All Pages With No Sub-Nav
- How to add drop symbol to parent nav items which have child
- WordPress 3.9 two menus in same position?
- What’s the policy for building a theme that doesn’t support widgets/menus?
- How to automatically set a Template Page Name next to a page in menu screen such as WooCommerce pages, front page, or posts page in wordpress?
- Dynamic nav menu with icons [closed]
- How to add posts to custom menus?
- How to remove search bar from a wordpress theme? [closed]
- Should I use set_transient or update_option?
- Template for individual post designs
- Best practice way to implement custom sections into a WordPress theme
- Pushing updates to your premium theme
- Where can I find a good reviewed collection of Twenty Ten child themes?
- How do I remove RSS feeds from themes?
- CSS in child theme not overriding the parent theme [closed]
- How to add (css) classes to only one wp_nav_menu()?
- Advantages of using instead of wp_enqueue_style()?
- Style.css redirects to 404 Page not found
- How to add suggest plugin to theme?
- Prevent update check for specific theme
- Am I supposed to create a child theme for every theme I use?
- using wordpress without javascript
- Theme Check: Could not find post_class
- Override theme programmatically
- Set multiple templates per post
- WP 3.1 upgrade breaks AutoFocus+ theme
- How can I display/hide certain content based on a Theme Option field?
- Lightweight framework [closed]
- multisite: global menu containing network site links?
- Custom markup with wp_nav_menu based on pages
- How to edit my theme for full width?
- Why does has_nav_menu return false when get_registered_nav_menus shows the opposite?
- Echo all category names, apart from one
- Overrite parent functions using child functions
- Does code in function.php differ from theme to theme
- How can I change the theme of different posts using a plugin?
- How to Create custom xml file for demo content for custom theme?
- Theme not showing up
- Change image size depending on page
- get_header action not working
- Navbar- disable “onClick” drop-down
- Unable to change the priority with ‘remove_action’ and ‘add_action’ in child theme
- Remove h1 from 2015 theme
- WordPress pulling in random page themes
- Can’t change theme name
- How to remove permalinks links presents in each page of my site?
- Is there a way to serve different resolution images to different devices?
- Parent/Child pages
- How to substitute old wordpress menu by wp 3 menu the right way?
- How to make a function occurs for one time?
- Problem with pagination link (error 404)
- home is not working in wordpreess
- Is there a way to create sections under “Colors” panel in the Theme Customizer?
- Local theme changes upload on server but theme changes not showing
- WordPress Custom font not found
- HTML TO WP Theme : Submenu goes down wp_nav_menu
- New created Theme leads to malfunctioning Xampp Apache –> functions.php is cause
- WordPress Blog Page displaying nothing
- Magnific Popup – Add Caption to Images
- How can I change the title of the Home link in the navigation bar?
- Custom link color or stylesheets
- Why do some sites show themes/”themename” as the only theme?
- Meaning of “if ( is_home() && ! is_front_page() )” snippet?