New update breaks CSS (CSS doesn’t seem to load)
-
New update breaks plugin CSS (plugin CSS doesn’t seem to load at all)
-
This topic was modified 6 years, 4 months ago by
chile-pepper.
-
This topic was modified 6 years, 4 months ago by
-
Hello!
Can you write link to plugin CSS? What is it called?
Not sure I understand what your question is.
You’re saying I should hard code the plugin CSS on to my website theme?This was working perfectly fine until I updated the plugin yesterday. I presume the CSS is supposed to load using wp_head() but this no longer happens
On your site do not load CSS for table of contents?
Show page URL with this problem.
I would rather not post my link
I am manually importing the CSS right now.
I have disabled all plugins (except Timber).
Still brokenSorry, I don’t understand your problem.
Can you describe in more detail what the problem is?The plugin CSS does not load/print
CSS-file and JS-file added to page only if table of contents is displayed.
I ran into the same issue. I’ve narrowed it down to a conflict when moving js scripts to the footer in the functions.php. When I remove the below actions, the below css is dynamically inserted into the source, but when moving scriptts to footer it breaks the Lucky TOC css insertion. This only happens with the latest update.
Page with TOC: https://jurdigstaging.wpengine.com/dui-attorney-marketing/
Script that won’t load with latest update:
https://jurdigstaging.wpengine.com/wp-content/plugins/luckywp-table-of-contents/front/assets/main.min.css// Move Javascript to Footer
remove_action(‘wp_head’, ‘wp_print_scripts’);
remove_action(‘wp_head’, ‘wp_print_head_scripts’, 9);
remove_action(‘wp_head’, ‘wp_enqueue_scripts’, 1);
add_action(‘wp_footer’, ‘wp_print_scripts’, 5);
add_action(‘wp_footer’, ‘wp_enqueue_scripts’, 5);
add_action(‘wp_footer’, ‘wp_print_head_scripts’, 5);-
This reply was modified 6 years, 4 months ago by
rizzlebizzle.
-
This reply was modified 6 years, 4 months ago by
rizzlebizzle.
Hello @rizzlebizzle !
Thank you for your research of the problem.
We see problem and fix this in next version.Until the next version is released, you can use a temporary solution. Add this code to functions.js in your theme:
add_action('wp_head', function(){ if (class_exists('\luckywp\tableOfContents\core\Core')) { \luckywp\tableOfContents\core\Core::$plugin->front->registerAssets(); } });-
This reply was modified 6 years, 4 months ago by
LuckyWP.
Worked like a charm, thanks @theluckywp
Fine! I’m glad what your problem is resolved!
@rizzlebizzle If you have a time, please rate the plugin here: https://ww.wp.xz.cn/support/plugin/luckywp-table-of-contents/reviews/#new-post
Hello @rizzlebizzle !
We released new version with fix this. -
This reply was modified 6 years, 4 months ago by
The topic ‘New update breaks CSS (CSS doesn’t seem to load)’ is closed to new replies.