- This topic has 7 replies, 3 voices, and was last updated 7 years, 10 months ago by
Tom.
Viewing 8 posts - 1 through 8 (of 8 total)
-
AuthorPosts
-
November 19, 2017 at 8:52 am #428224
David
Thanks.
November 19, 2017 at 9:46 am #428256Tom
Lead DeveloperLead DeveloperIn GP version prior to 2.0:
add_action( 'after_setup_theme', 'tu_remove_dynamic_css' ); function tu_remove_dynamic_css() { remove_action( 'wp_enqueue_scripts', 'generate_color_scripts', 50 ); remove_action( 'wp_enqueue_scripts', 'generate_spacing_scripts', 50 ); remove_action( 'wp_enqueue_scripts', 'generate_typography_scripts', 50 ); remove_action( 'wp_enqueue_scripts', 'generate_secondary_color_scripts', 80 ); remove_action( 'wp_enqueue_scripts', 'generate_background_scripts', 70 ); }In GP 2.0:
add_action( 'after_setup_theme', 'tu_remove_dynamic_css' ); function tu_remove_dynamic_css() { remove_action( 'wp_enqueue_scripts', 'generate_enqueue_dynamic_css', 50 ); }November 23, 2017 at 6:25 am #431469David
Thanks!
November 23, 2017 at 9:33 am #431733Tom
Lead DeveloperLead DeveloperNo problem 🙂
June 22, 2018 at 3:01 am #605890Rafał
Hi!
Have you noticed that still remains some stuff?<style id='generate-style-inline-css' type='text/css'> .main-navigation .navigation-logo img {height:60px;}@media (max-width: 1030px) {.main-navigation .navigation-logo.site-logo {margin-left:0;}body.sticky-menu-logo.nav-float-left .main-navigation .site-logo.navigation-logo {margin-right:0;}}.mobile-header-navigation .mobile-header-logo img {height:60px;}.main-navigation .main-nav ul li a,.menu-toggle,.main-navigation .mobile-bar-items a{transition: line-height 300ms ease} .slideout-navigation.main-navigation .main-nav ul li a{font-weight:normal;text-transform:none;} </style>June 22, 2018 at 9:15 am #606195Tom
Lead DeveloperLead DeveloperAh, that’s coming from the Menu Plus module and can’t be removed as easily.
Another idea is to remove the core stylesheet in GP, and re-add it with a different ID:
add_action( 'wp_enqueue_scripts', 'tu_rename_style', 20 ); function tu_rename_style() { wp_dequeue_style( 'generate-style' ); wp_enqueue_style( 'generate-custom-style', get_template_directory_uri() . "/style.min.css", array( 'generate-style-grid' ), GENERATE_VERSION, 'all' ); }June 24, 2018 at 7:12 am #607293Rafał
does not remove inline CSS :/
June 24, 2018 at 9:17 am #607466Tom
Lead DeveloperLead DeveloperCan you link me to your site?
BTW, I definitely don’t suggest that anyone do this. It will make it so all of the Customizer settings no longer work.
If you don’t want inline CSS, I suggest using Autoptimize (https://wordpress.org/plugins/autoptimize/). It takes all of the inline CSS and caches it inside a file.
-
AuthorPosts
Viewing 8 posts - 1 through 8 (of 8 total)
- You must be logged in to reply to this topic.