Is there there an existing function that can clear/regenerate css only for a single page/template using id? #19395
aliboy08
announced in
Developers Community
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to regenerate css only for a single page/template using post id?
The problem I am having is styles rolling back on templates (responsive styles, like margin) everytime changes are made.
my current solution is to trigger the regenerate function everytime a page is updated/saved using the hook:
elementor/editor/after_save which has a post_id
e.g:
add_action( 'elementor/editor/after_save', function( $post_id, $editor_data ){
Elementor\Plugin::$instance->files_manager->clear_cache();
}, 10, 2 );
but this function seems to clear all css files, I would only want it for a single post/template using the $post_id available on the hook
https://prnt.sc/ZXLnpkOiPFzm
Is there an existing function that can do this?
Beta Was this translation helpful? Give feedback.
All reactions