Can you try this, it was what I tried to explain in my comment. Again, this is just a guess.
function js_async_attr($tag){
// Add async to all remaining scripts
return str_replace( ' src', ' async="async" src', $tag );
}
add_filter( 'script_loader_tag', 'js_async_attr');
function remove_js_async_head(){
// function to add async to all scripts
remove_filter( 'script_loader_tag', 'js_async_attr');
}
add_action( 'wp_head', 'remove_js_async_head', 100);
Related Posts:
- Clean-up script tags
- Remove Actions/Filters added via Anonymous Functions
- Add class to menu items of one specific menu (nav_menu_css_class)
- How to influence the information displayed on widget inside wp-admin
- Does WordPress Development Mode Exist (with not minified JS)?
- How to restrict actions and filters “properly” by conditions
- Filter the query ONLY for the search results page
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- Using add_filter() in Widgets
- Customize WordPress Media Manager – Media Window
- Apply jquery script to only woocommerce product pages and categories
- Is it possible to use a forgot password url filter?
- Wrap gutenberg block ‘div’ in other elements/extra HTML
- Remove Page Title from Static Frontpage
- Default or Preset Content for Custom Post Types
- Override a class function to include a custom template
- Enqueuing External Javascript functions.php
- Properly applying nonce to a form using AJAX
- add_filter priority problem
- wp_enqueue JavaScript in child-theme (ReferenceError) using Search & Go
- How to use IF Statement in WordPress?
- Gravity Forms field entries into wp_query loop [closed]
- Post Pagination Showing Same Posts Every Page
- Why is my Gutenberg block returning an error after initial save?
- modify a function filter
- Super simple shortcode not working
- How would go about if I just want a temporary function?
- Generating rel=prev and rel=next only on wordpress categories
- How to make applyFilters function return false via functions.php
- Accepted arguments value in hook functions
- Get current page_id before loop, in functions.php
- How to filter a table in post content without plugins? [closed]
- Which action hook to use for function?
- str_replace function in theme
- Modify a function without editing template
- How to hide unused profile fields?
- How to add nav menu items to a specific position within a menu
- Disable auto-resizing of uploaded images, but only for certain filename
- Filter out other users comments. Visualize only own comments and editor role users’ comments
- Get Current Post ID in functions php, meta query filter
- call of javascript function to external url always blocked by cors
- Output and filter data from a XML url
- Add to cart php not working [closed]
- Is possible add icon in title posts only in specific tag?
- What did I do wrong in my functions code, that will not change the “Get New Password” text to “Send It”?
- create filter in functions.php
- How to search using ajax for exact phrase or words in an input field?
- Insert image in WordPress with HTML5 tag and caption function
- How to construct function for applying filter?
- Adding an external HTML link to a post thumbnail
- Overwriting the menu break points of twentysixteen in child theme
- woocommerce change currency per category [closed]
- I can’t enqueue my scripts – They literally aren’t being added to my site
- Redirect to another page using contact form 7? [closed]
- Make wp_link_pages() suitable for Twitter Bootstrap markup
- Setting a default text for excerpts of a particular category
- Can’t properly set the_title add_filter to show short_URL
- Add_filter when value is no variable?
- (Woocommerce) Order by price when entering specific category
- How to edit classes in body tag?
- Possible to hook into Media Library preview File column and use a custom image?
- How to display the_archive_title() and the_archive_description() – “weird” interaction
- How to add custom li item to wordpress menu
- Theme JS is available but theme CSS isn’t
- How to edit/replace Parent functions.php function in Child Theme to add “Walker” class
- Need help with customalert that it would read on a normal page, but not in WordPress
- Functions Filter Question [closed]
- Is it possible to use add_filter in an included file in the child theme’s functions.php?
- Insert Content Before div#main from the functions.php File
- Linking Javascript in functions.php file
- Dequeue scripts in IE7 only using functions.php
- Changing the text of Upload/Insert on Posts and Pages Screen
- Conditional custom menu?
- Get URLs for AJAX Filter Checkboxes WordPress
- How to change text color depending on the number value (Using javascript)
- Add custom taxonomy using JS in post editor
- How to display an image before title text in menu items
- wp_set_object_term via js btn frontend
- Adding custom social icons to the social media icon block in the Gutenberg editor?
- Display Script in Header When URL Variable Present
- Filter works on last selection but no others
- post value to function with Ajax and jQuery
- Prevent function from triggering on current page
- Assign IDs to headings in ACF using functions.php
- Multiple Notifications SetInterval
- Redirect specific author posts to another url
- admin-ajax.php & my wp-admin folder url showing in header
- Best way to add image to recent posts widget?
- wordpress ajax is not working for dropdown selection
- previous_post_link inside of a function?
- Retrieve a custom form field modified by a filter
- Print all inline styles to head
- java script error Uncaught SyntaxError: Unexpected token ILLEGAL
- Function Reference for custom link in Admin Menu Management Page
- Way of getting queried loop before the query with a filter hook?
- new to javascript – using in instead of functions.php, not loading correctly
- Trying to get this function to show below the content
- Animated Accordion [closed]
- Warning: call_user_func_array() expects parameter 1 to be a valid callback
- Can’t find function which is called in a wordpress theme