Notifications
Clear all

Video preload

2 Posts
2 Users
0 Reactions
991 Views
Posts: 4
Topic starter
(@igork82)
New Member
Joined: 4 years ago

Hi guys!

How to set the video html tag preload to none?

Thanks!

1 Reply
Elvina
Posts: 1403
(@elvina)
Support
Joined: 5 years ago

Hi @igork82,

Please put the following JS code in the current active theme functions.php file:

add_filter("wpdiscuz_after_read_more", function ($content) {
return preg_replace('~(<video[^>]*)>~is', "$1preload='none'>", $content);
}, 999);

Don't forget to delete all caches and press CTRL+F5(twice) on the frontend before checking.

Also please note the code works only for the front-end

Reply
Share:
Scroll to top