Site logo

[Resolved] Video loop filter isn't stopping the loop?

Home Forums Support [Resolved] Video loop filter isn't stopping the loop?

Home Forums Support Video loop filter isn't stopping the loop?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #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. 🙂

    #367560
    Leo
    Staff
    Customer Support

    Hi 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 🙂

    #367953
    Katie 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';
    }
    #368037
    Tom
    Lead Developer
    Lead Developer

    It 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).

    #368049
    Katie Jones

    Oh cool, thanks Tom!

    #368381
    Tom
    Lead Developer
    Lead Developer

    Couldn’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/

    #368383
    Katie Jones

    I will, thank you! 🙂

    #368513
    Tom
    Lead Developer
    Lead Developer

    I just sent you the upcoming version.

    You should be able to do this now:

    add_filter( 'generate_page_header_video_loop', '__return_false' );

    #368757
    Katie 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! 🙂

    #368787
    Tom
    Lead Developer
    Lead Developer

    You’re welcome! 🙂

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.