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]
- wp_nav_menu_items callback not triggered
- Why is wp_nav_menu() not removing the container around the nav ?
- How can i make multilevel menu in wordpress theme with bootstrap
- Default Nav Highlight
- Customizer: get_preview_url() inside customize_save_after hook
- Valid SQL query not returning results
- How to modify mobile nav menu text in theme
- Theme development: How to add CSS classes to menu items?
- How to track a users last visited page?
- get_header action not working
- Navbar- disable “onClick” drop-down
- In a Gallery with limited image posts, how do I not limit images on single post?
- Shortcodes do not work in own template
- Adding Bootstrap to WordPress TwentySixteen Theme
- Unable to change the priority with ‘remove_action’ and ‘add_action’ in child theme
- LESS not working in WordPress [closed]
- StoreFront WordPress theme: How can i create a new Home page with Custom design same as template [closed]
- How do I include a partial from a directory below a wordpress theme directory?
- Is there a way to switch to another theme?
- A post with a clear:both in its css destroy the theme design, and the sidebar is moved to the bottom
- New to WordPress – Read the Codex, Other Docs; Still Confused
- Adding content inside the anchor tags within WordPress main nav
- How add built-in textarea in theme development?
- Create theme for mobile phones and tablets only?
- Unwanted empty line at the beginning of document
- How to add custom page elements to the WYSIWYG editor?
- Theme development: menu links a tabbed page with page jumps
- Remove h1 from 2015 theme
- Never actually adding the action? Or do I have to call the action?
- WordPress pulling in random page themes
- How to Emulate Default Navigation Menu Behaviour in a Custom Theme?
- best practices for updating wordpress theme
- How to correctly load a different version of main menu based on the user language in WordPress? Is it a good solution?
- Why I obtain different visualization when I run the website on my local machine and on remote server?
- Why in this WordPress theme I can’t see the Main Menu?
- how to hide home nav link in wordpress
- Seeting Active Nav for Bootstrap in WordPress
- How to conditionally add a wp_filter
- Filter didn’t work on content class (hybrid_post_attributes)
- Can’t change theme name
- Remove/Hide a Widget on a Custom Template
- How to hide custom sidebar on mobile
- How do I implement jPanelMenu?
- How to use the _S framework
- When trying to set title, not sure how to edit it for different pages
- How to remove permalinks links presents in each page of my site?
- first excerpt fine, subsequent post excerpts shift to the right instead of displaying vertically [closed]
- Does wordpress add their own classes into nav menus?
- Post archives link yields a 404 Not Found
- Change Image Sizes for Mobile Theme
- Recommended sidebar / content widths
- Theme Checker Text Domain
- Converting a theme to a child theme in a network
- HTTP Error when uploading images over specific dimensions
- Get video from the post on homepage
- Why is the `if else` not working?
- Custom menu: Link names