This seems to work, modifying the display_css_output()
in this way:
function display_css_output() {
$html = get_transient( 'my_custom_styles' );
if ( empty( $html ) ) {
$html = $this->generate_css_output();
global $wp_customize;
if ( ! isset( $wp_customize ) ) {
set_transient( 'my_custom_styles', $html, DAY_IN_SECONDS );
}
}
echo $html;
}
$short_life
no longer needed. Basically check to see if $wp_customize
is set, don’t bother setting transient then.
Related Posts:
- Where are Additional CSS files stored
- Plugin SVN & update API – how are plugins identified?
- How to use more than 256MB of memory in the admin?
- Localization: I want the backend: english and frontend in defined language
- Custom Search Query
- How to get current_cat in navbar, in single post
- Removing fields from the Media Uploader/Gallery
- When using the block.getSaveElement hook can you output different markup based on whether or not you are in the edit view or the live page view?
- wordpress custom walker for thumbnails with custom menu
- Adding an email column to a Custom Post Types Admin Screen?
- Selecting An image from the Media LIbrary on the frontend
- WordPress audio player has two different styles
- Allow Users to Set Password During Registration
- How wp_ajax_nopriv since WordPress 3.1
- WordPress 3.1 removing ‘category’ from the slug
- Why does WordPress 3.0.4 keep deleting the contents of the .htaccess file?
- Set user loggin status?
- Intercept invalid email during lost_password
- Only append custom classes to nav menu items
- redirect product-category to a custom page
- Hide upload image fields for the different media upload popups
- custom headers for static home page and posts page
- WP-Admin gives 403 Forbidden after login on CentOS 7
- Custom Taxonomy Archive not displaying entries
- Creating Search Engine Friendly URL’s with Word Press
- How to redirect WooCommerce shop URL?
- Add Div to Comment Form
- Extend Screen Options
- Best way to implement a thumbnail-based gallery in WordPress?
- Why is my mod_rewrite not working?
- Show posts on a page based on a category and tag(s)
- Any tools for quickly grabbing comments / comment count?
- Custom WP_Query with no posts to output
- How to add “Read More…” link in twentytwenty
- Adding Page Attributes and Page Templates to Custom Post Type WP 4.7.3
- How to remove the search fields in Twentytwelve
- WordPress Locale Switching on Accept-Language Header
- syntax highlighting for theme-editor.php?
- adding homework to a school’s website
- Understrap child theme JS not working in custom-javascript.js file
- How do I call in a category title on a category page in a child theme?
- Resizing of a header/div in a website through css in wordpress [closed]
- Include custom JS without child theme
- Prepopulating a specific page template with HTML/CSS
- Login/Logout Session Sharing – Multiple WordPress Installations
- How to get every custom taxonomy names and urls?
- How can I stop access of unregistered user in wp-content/uploads directory without using .htaccess file?
- Is there a way to by-pass the pagination function on one custom template?
- Where in code to replace content before display of page?
- Page content dissapears after loading the page [closed]
- Create page as a file in my theme?
- Changes in my child theme from customizer not appearing in style.css?
- Simplify the admin end
- Creating a shortcode by pulling in a custom field from a plugin
- Hide Customizer’s Widget Choices From The List
- How to add span on WordPress Title for first and third word
- Custom Post Types database persistance. Why not?
- Edit specific text on a static page
- Customise the Category Widget
- Showing Meta Box via Jquery Checkbox
- custom user meta query
- problem saving/ retrieving custom meta with wp alchemy metabox
- Problem with custom function from jQuery slider tutorial
- Create new network instance, import old single installs AND keep the urls?
- Don’t update modify time post on Quick Edit
- How to style bootstrap container in WordPress?
- Problems with setting up a subdomain to serve images and scripts
- Why does a custom php code inside a custom template not get executed?
- Change login cookie expiration time?
- Disable “-mp4-image” screenshots from appearing in Media?
- wordpress custom posts page not showing
- Wrap WordPress Login Form in custom Div
- Automatically reject a comment if website field contains anything
- Post filter with multiple checkbox taxonomy terms
- Replace publish date in blog module with custom field
- Need help with drop down list on the profile
- generate a static copy of the website footer html
- Multi-site customization
- Creating WordPress staging environment software
- How to add H1 Tag on Homepage?
- Show different pages on site depending on user choice
- Is there a way to limit multi upload in media upload box?
- Use another theme template in my theme
- Display popular posts by how many hits it got within 30 days of publishing
- Pulling posts into static site (wordpress as subdirectory)
- Call a duplicate registration form with other url
- How to support extra color options for shortcodes?
- WP Customizer – what types of fields is it capable of supporting?
- How to make my wordpress site responds for 2 domains
- User registration add user ID?
- Can’t Auto-Update, but permissions are good?
- Pass query param to custom page
- How to answer, and we aren’t using WordPress to manage your site? [closed]
- responsive screen not working [closed]
- Is there a way to have information on one page automatically feed into another? [closed]
- Changes to code not displaying
- Permalink Listing WordPress
- Has the table name in SQL for WordPress changed from WP_posts to WPCS_post?
- Multi color post title by using custom javascript inside the gutenberg editor?
- Add custom styles to the Raft theme