- This topic has 9 replies, 3 voices, and was last updated 8 years, 7 months ago by
Tom.
-
AuthorPosts
-
August 16, 2017 at 1:36 pm #367545
Katie Jones
Hi hi,
I’m using this code in my functions.php to stop the video loop, in the latest GP, though the video is still looping. Any ideas?
add_filter( 'generate_page_header_video_loop','__return_false' );Editing to add the link: http://carefreemedium.staging.wpengine.com/
Edit 2: It’s easy to make a change to a live site and not the staging site on WP Engine – I checked that I made the update to the staging site, by replacing the code with die() – yep, it’s the right site. 🙂
August 16, 2017 at 2:02 pm #367560Leo
StaffCustomer SupportHi Katie,
Can you give this method a shot? https://generatepress.com/forums/topic/generate_page_header_video_loop-filter/page/2/#post-297665
Let us know 🙂
August 17, 2017 at 7:40 am #367953Katie Jones
Thanks Leo! Though shoot, this still isn’t working. I’ve tried clearing cache. I temporarily stuck a die() in the tu_disable_video_loop function before the return and the page still loads so I wonder if that function isn’t being hit. I don’t have any hooks disabled in GP Hooks. Any ideas?
The code I have in my functions.php file is:
add_filter( 'generate_page_header_video_loop', 'tu_disable_video_loop' ); function tu_disable_video_loop() { return 'loop:false'; }August 17, 2017 at 9:03 am #368037Tom
Lead DeveloperLead DeveloperIt seems that filter was removed in 1.4.
It was a “broken” filter before, which is likely why. I’ll improve it and re-add it into the next version (coming out today or tomorrow).
August 17, 2017 at 9:08 am #368049Katie Jones
Oh cool, thanks Tom!
August 17, 2017 at 5:51 pm #368381Tom
Lead DeveloperLead DeveloperCouldn’t get it out today, but I can send you the latest version just to make sure it’s all fixed if you like? If that sounds good just shoot me an email: https://generatepress.com/contact/
August 17, 2017 at 5:52 pm #368383Katie Jones
I will, thank you! 🙂
August 18, 2017 at 12:37 am #368513Tom
Lead DeveloperLead DeveloperI just sent you the upcoming version.
You should be able to do this now:
add_filter( 'generate_page_header_video_loop', '__return_false' );August 18, 2017 at 9:12 am #368757Katie Jones
That works!
For everyone’s reference, this other code floating around did not work:
add_filter( 'generate_page_header_video_loop', 'tu_disable_video_loop' ); function tu_disable_video_loop() { return 'loop:false'; }Thanks, Tom! 🙂
August 18, 2017 at 9:44 am #368787Tom
Lead DeveloperLead DeveloperYou’re welcome! 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.