Skip to content

Instantly share code, notes, and snippets.

@timelsass
Created January 31, 2019 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timelsass/d73c54b9f89a55e4a0d0dffbce50e625 to your computer and use it in GitHub Desktop.
Save timelsass/d73c54b9f89a55e4a0d0dffbce50e625 to your computer and use it in GitHub Desktop.
Disables Primary Menu Collapse for BoldGrid Theme Framework v1 based themes.
<?php
/**
* Plugin Name: Disable Primary Menu Collapse
* Description: Disables Primary Menu Collapse for BoldGrid Theme Framework v1 based themes.
* Plugin URI: https://gist.github.com/timelsass/d73c54b9f89a55e4a0d0dffbce50e625
* Author: Tim Elsass
* Author URI: tim.ph
*/
/**
* Adds Inline CSS to site to override collapse behavior.
*
* @since 1.0.0
*/
function bgtfw_disable_primary_collapse() {
$css = ".palette-primary .navbar-collapse.collapse{display: block;}.palette-primary .navbar-nav > li, .palette-primary .navbar-nav{float: left;}.palette-primary .navbar-toggle {display: none;}";
wp_add_inline_style( 'style', $css );
}
add_action( 'wp_enqueue_scripts', 'bgtfw_disable_primary_collapse' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment