Home › Forums › Backend Issues (wp-admin) › JS performance issues › Reply To: JS performance issues
Following up on @sdempsey I found that loading pages with large numbers of TinyMCE fields caused the issue. Disabling TinyMCE “fixed” the issue, except that the client isn’t going to be learning HTML to make changes.
I was also able to get the page load, though at an incredibility slow speed, by switching the WYSIWYG fields to Basic.
My current solution is to force the page to load in HTML, then to switch to WYSIWYG after load.
In functions.php, I am adding to @sdempsey code:
function load_custom_wp_admin_style_scripts() {
wp_enqueue_script( 'admin-script', get_template_directory_uri() . '/assets/js/admin.min.js', array( 'jquery' ), '20120202', true );
}
add_action( 'admin_enqueue_scripts', 'load_custom_wp_admin_style_scripts' );
For the admin JS, all I am doing it clicking on all of the Visual switch buttons after the page loads.
jQuery(document).ready( function(){
jQuery('.wp-switch-editor.switch-tmce').click()
});
Not a great solution, but it’s working for now.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🤔 Curious about the ACF user experience? So are we! Help guide the evolution of ACF by taking part in our first ever Annual Survey and guarantee you’re represented in the results. https://t.co/0cgr9ZFOJ5
— Advanced Custom Fields (@wp_acf) May 8, 2023
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.