UCSS for page type not working




Wordpress LScache Plugin: UCSS for page type not working

Last Updated on: Wed, 15 Apr 2026 00:00:02
The documentation for generating a single UCSS file for each post type says to use this filter: add_filter( litespeed_ucss_per_pagetype, __return_true ) That caused a critical failure. I deleted the inappropriate leaving me with this: add_filter( litespeed_ucss_per_pagetype, __return_true) But it still didnt work. No CSS file was generated and my site was a complete mess. Should I use apply_filter instead or add a priority? This topic was modified 3 months, 1 week ago by mesmer7. add_filter( litespeed_ucss_per_pagetype, __return_true ) I tested on StoreFront product page and it works on me Is there a delay in generating the UCSS? If so, how long is the delay? Do I need to switch over late at night when theres no traffic? in order to trigger the UCSS , the page must not have any existing UCSS , by that saying , purge all page cache and purge all UCSS then next time , as page cache miss , the page is visited , the UCSS will be added into queue the queue will be executed by wp cron , so also please make sure your cron works Ah that must be it. Right now Im getting mixed results. Many pages look great, and many look terrible. Nope, problem is back. But now it seems to be the UCSS itself, not the post type filter. The UCSS reset the color of unvisited links to the parent themes color, ignoring my child themes color. It also scrambles my child themes CSS for the audio player on the product pages. Maybe Combine CSS is combining parent and child theme CSS in the wrong order? Can I generate UCSS without the combine function? If not, how can I fix this problem? I should mention that my child theme CSS is split into several files. CSS combine is like a master switch to UCSS try manually add that link coloring into the whitelist please check this page That might work for the link color, but I dont want to whitelist the style for audio player. That is only needed on woocommerce product pages. oh, I wonder if this might be the problem with the links: Are CSS pseudo variables like this not supported by the UCSS? :root --header-fonts: Montserrat , Arial , sans-serif !important --header-color: #3a3d77 --nav-fonts:Source Sans Pro, Roboto, Verdana, sans-serif --separator-light: #f2f2f3 --separator-dark: #d3ced2 --link-color: #0a88db --button-shadow: 3px 3px 5px 0px rgba(50, 50, 100, .5) --widget-title-background: url( images/widget-title-background.jpg ) a color: var(--link-color) text-decoration: none !important Nope, eliminating the css variables didnt solve the problem either. well , no : ( it doesnt have custom CCSS rule per certain page alone Okay, Ive tried this a dozen ways. It seems the UCSS strips out all the styles needed to display wordpress wp_audio_shortcode() on my product pages and all the styles needed to display the list view on the shop pages. Wordpress wp_audio_shortcode() uses javascript to replace the HTML audio tag with something called media element. The grid/list toggle function does something similar changing which div elements are visible at the press of a button. It seems that since these elements arent part of the initial DOM, but added through javascript, the Quick.cloud determines that the styles for those elements are unnecessary and leaves them out of the UCSS. The media element styles are critical on the product pages, but I dont want them loaded for other posts/pages. Is there a way I can specify essential styles per page/post type? P.S. The quick.cloud wont let me view the slack forum because my computer is too old. please check this page @CacheCrawler I read that page. If I understand it correctly, adding a style to the allow list includes it in ALL the style sheets. Thats not what I want. I want it ONLY in the style sheets for the product pages.



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference