Support » Fixing WordPress » No sound in Youtube on Frontpage

  • I try to get volume control in a Youtube movie on the frontpage of my website. But I cannot figure it out. How to solve this”problem”?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Marius L. J.



    Do you mean the video in the Twenty Seventeen theme header? If so there is no audio available, this is intentional as video headers are meant to be visual elements on a site, and not fully functional video players.

    You can extend the filter here and change this behavior, but it does require some code, I don’t know if this is what you are looking to do though?

    I am looking for this. What filter am I looking for. I can code.

    Moderator Marius L. J.


    The details about them are mostly outlined in which contains a list of all the new functions, hooks and filters it introduced, I’ve not dug into it my self yet but I believe the custom header markup ones might be what you are looking for.

    looks like it set in the JS file here: Line 279

    video.muted = 'muted';

    There is no filter or hook that I see that can override this.

    This would require copying this file into your theme and commenting out that line then adding this to your functions.php

    add_action( 'wp_enqueue_scripts', 'replace_scripts', 20 );
    function replace_scripts(){
        wp_dequeue_style( 'wp-custom-header' );
        wp_enqueue_script( 'wp-custom-header', get_template_directory_uri() . '/my/version/of/wp-custom-header.js');

    Thanks. I am having the same issue, and would like specific steps (please) on how to “unmute” the audio on my YouTube URL for my Twenty-Seventeen Front Page Header. The video looks great, but I also want the hear the audio. Any ideas? I am not a coder. Thank you.

    It would be fantastic if there was an option in customizer to unmute audio on the homepage. There are plenty of reasons why you’d want to have audio with your video, especially if you are using a clip from youtube. This would make the theme a whole lot more useful.

    This is just an arrangement but it worked for me.
    I changed the contents of the header with javascript. Put it inside a widget or the page.

    var x = document.getElementById("masthead").clientHeight - 52;
    document.getElementById("wp-custom-header").innerHTML = '<iframe width="100%" height="'+x+'" src="" frameborder="0" allowfullscreen></iframe>';

    Hi Kinrpg

    so i must put the following code into a widget or page right?

    var x = document.getElementById(“masthead”).clientHeight – 52;
    document.getElementById(“wp-custom-header”).innerHTML = ‘<iframe width=”100%” height=”‘+x+'” src=”; frameborder=”0″ allowfullscreen></iframe>’;

    • This reply was modified 2 years, 3 months ago by  jkreukniet.
    • This reply was modified 2 years, 3 months ago by  jkreukniet.
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘No sound in Youtube on Frontpage’ is closed to new replies.