-
AuthorPosts
-
February 3, 2022 at 12:16 pm #1338673
Hi,
Can you please help me to disable Post CSS files in order to make css to be inlined in html elements.
I had to downgrade to Enfold 4.8.2 to get it back to work like that.
What I need is to disable how Enfold started to create random named elements classes for html tags, and make it work like in the OLD VERSION:NEW VERSION: <div class=”flex_column av-bmlvzk3-2965616019b192ed552f1b6fc2767ee1 …”>
OLD VERSION: <div class=”flex_column …” style=”background: #94b3c8; padding:30px 30px 15px 30px ; border-radius:0px; “>…
I already found this piece of code to put the css in the HTML, but I need to go further and inline the css within the html tags.
/** * Filter to skip css file generation. * You can add logic to skip for certain pages/posts only. * * @since 4.8.6.1 * @param boolean $create * @return boolean true | false or anything else to skip generation of css file */ function custom_avf_post_css_create_file( $create ) { return false; } add_filter( 'avf_post_css_create_file', 'custom_avf_post_css_create_file', 10, 1 );
Tx.
February 3, 2022 at 2:15 pm #1338697Hey loumirak11,
If you add that function to your functions.php file, then it should go back to the way it used to work.
Best regards,
RikardFebruary 4, 2022 at 12:53 am #1338787Hi Rikard,
No, it doesn’t….
What I need is to disable how Enfold started to create random named elements classes for html tags, and make it work like in the OLD VERSION.
I need the CSS to be inlined inside the element, not outside between <style> tags.Tx.
- This reply was modified 2 years, 10 months ago by loumirak11.
February 4, 2022 at 12:22 pm #1338872Hi,
The inline styles for the elements are not included in the shortcodes files anymore and the only way to bring them them back is to manually edit the files, which will take significant amount of modifications, or revert back to an old version of the theme just like what you did but it is not recommended. All custom styles will now be added in a style tag when the post css file option is disabled.
Why do you have to disable the post css files in the first place?
Best regards,
IsmaelFebruary 4, 2022 at 3:01 pm #1338913Hi,
That’s a shame.
I had to disable the post css files because I use the Layout builder to create templates that I use for Custom Post Types with Custom Fields.
Best regards,
-
AuthorPosts
- You must be logged in to reply to this topic.