If you have WP-CLI installed, try to run wp cache flush
or
you can put this code into your functions.php
function fix_template_caching( WP_Screen $current_screen ) {
if ( ! in_array( $current_screen->base, array( 'post', 'edit', 'theme-editor' ), true ) ) {
return;
}
$theme = wp_get_theme();
if ( ! $theme ) {
return;
}
$cache_hash = md5( $theme->get_theme_root() . "https://wordpress.stackexchange.com/" . $theme->get_stylesheet() );
$label = sanitize_key( 'files_' . $cache_hash . '-' . $theme->get( 'Version' ) );
$transient_key = substr( $label, 0, 29 ) . md5( $label );
delete_transient( $transient_key );
}
add_action( 'current_screen', 'fix_template_caching' );
Hope this helps!
🙂
Related Posts:
- WordPress ignoring specified template for front page. Why?
- Display a specific dynamic sidebar widgets on a specific page
- Creating new templates in child themes breaks layout
- OptimizePress Theme Overriding add_filter page_template
- How do I change the scan depth for page template files?
- Get name of current page template in Gutenberg era
- Selected template is not respected for home page in WordPress
- Widgets not showing on sidebars
- How to use custom page templates in a theme that hides page template option?
- Setting a new default template for the creation of a page
- Set custom directory in theme for page templates
- What happens to bespoke page template references on theme change?
- WooCommerce My Account Shortcode
- How to add custom css/js files to a template in wordpress
- Different logo on homepage
- Translation not working after editing plugin template
- How to apply different themes with custom design in one site?
- Does wordpress templates always in files or in database?
- How to make Additional css changes global all across the web pages on WordPress website?
- WordPress without a theme – help!
- How to restore file or theme?
- A /proc folder in wp-content?
- how do i in ignore/disable/delete a javascript call from parent in child theme?
- Problem Installing a Premium Theme– File Permission Issue on a Mac, Local Machine? [closed]
- How to install themes with the demo content?
- Jetpack CSS .screen-reader-text breaks mobile menu [closed]
- Error when using ‘continue reading’
- How to update theme to specific version
- Child theme’s stylesheet cannot load [closed]
- Variant of the same theme for each page
- can’t see aditional themes in control panel
- Configure new installed WordPress in live server
- When someone likes an article on my blog, they are prompted to log in on WordPress.com [closed]
- Page Template Dropdown For Custom Post Types
- WordPress TwentyTen Theme Incompatible with Theme Unit Test
- What’s the default order used by WordPress to load CSS files?
- Where does WordPress get the theme name from to check for updates?
- How to display a product features dynamically with icons?
- Hi everybody, I have a problem of search box
- WordPress theme logo handling (Trying to use GIF as logo)
- How can I remove all traces of a theme?
- Changing an image in header.php
- Installing a theme on localhost, Ubuntu 16.04
- Unable to find translations in WordPress theme
- Updating WordPress Theme Files
- A thin line between native wordpress bahaviour and 3rd party themes
- Display Pointer only once?
- Will I lose the pages I’ve created within a default WordPress theme when adding a new theme?
- Theme title in admin shows full path [closed]
- Multiple sub directories for theme template pages
- How to get the theme directory URI?
- Is there a way to see how a theme will look before buying it?
- From where wp ecommerce is loading plugin theme files?
- Making first post wider than other posts on home page(default)
- My blog suddenly can’t find my stylesheet?
- Twenty Ten Theme: Replace the Logo by a picture without moving the code
- In a specific blog, the K2 theme does not have a Text Widget
- How to fix Scrape key check failed on WordPress VPS?
- How to push a theme update for a ciustom theme used on multiple independant self hosted sites?
- Removing a widget via theme editor
- Can’t embed certain youtube videos into theme
- How to customize a section of a widget only on certain pages or page
- How do I get the featured image to sit below the header in the twenty nineteen theme?
- How to use my .mo file in the Divi child theme instead of file in a parent /builder directory?
- How to fix Gutenberg with SiteOrigin page builder deleting content when editing
- Simple filter to change label name of Email Adress to something else
- Basic wordpress search shows no results
- How do I remove search bar that isn’t a widget?
- Show only the beginning of post
- Changing theme folder name disrupts widgets
- TwentyFourteen Theme : Changing grid layout
- Edit a template while still keeping a Landing Page on the main address
- How can I Update my Theme
- How to allow users to switch to the child theme from front end without plugin?
- Use random theme
- Change whole theme depending on resolution
- post_prev & post_next within same category
- Costum Theme template directoy url problem
- Replacing current theme folder by previous version of the same folder produces “undefined function get_header()” error
- Theme comment callback results nothing
- How to remove the option data of a theme when that theme is removed?
- How to find out which template the HTML content comes from?
- Resetting Themes Folder to Default
- What is the general cut-off date for reviewed themes in the WordPress.org repository?
- Sub-Theme (based on Taxonomies)
- How to Hide Blog Post Author?
- Convert theme to be based on Bootstrap?
- Include root files into header files
- Commenting in CSS (//) equals “none”? [closed]
- Static posts page is not working
- Cannot use some themes within Managed WordPress of Go Daddy [closed]
- How to track your theme usage on the internet?
- How to add Company Logo to Chosen Theme
- What security risk is not having “default” theme?
- Is there a way to have WordPress autodetect page templates in the page-templates directory and any sub-folders?
- Why does WP theme not look like promoted? [closed]
- Remove image next to header image on WellExpo theme [closed]
- Table of Contents in Left Navbar [closed]
- Adding PHP code to single template in 2023 edition of WordPress theme
- Featured image on page is not displayed with certain theme: how to debug this?