Support » Fixing WordPress » Audio Players not showing after upgrade

  • Resolved Dodger57



    Just upgraded to 3.9.1 – after doing so all of our audio players are missing. They appear to be there when the source is viewed but not on the page. I’ve disabled plugins, tried other browsers but still a no show on the players. Here is one of the pages in question. The players should be just above the “download” links.

    The page is using the loop on an external site. Worked perfectly before the upgrade – not sure what the deal is. Any ideas? I don’t want to have to use a plugin if I don’t have to.


Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator kmessinger

    shows errors at each player’s short code. 3.91 shouldn’t change any html.

    Have you tried:

    – deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the default theme to rule out any theme-specific problems.

    – resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    – re-uploading all files & folders – except the wp-content folder and wp-config.php & root .htaccess files – from a fresh download of WordPress. Make sure that you delete the old copies of files & folder before uploading the new ones.

    Hello – thank you for the reply!

    -Yes via FTP
    -Yes – created new directory with fresh files then copy content/config to it. Rename directories. This is how I upgrade. Tried it again – still no joy.

    Still no players.

    Here is another site that using the exact same system – but has not been updated yet – and it get’s the same validation errors on WP code but the players work fine.


    Moderator kmessinger


    The code is different on the sites.

    Working site
    <audio id="audio-4843-2" class="wp-audio-shortcode" controls="controls" style="width: 100%" preload="none">

    Non-working site
    <audio id="audio-292079-2" class="wp-audio-shortcode" controls="controls" style="width: 100%; visibility: hidden;" preload="none">

    Removing the visibility and the player shows up.

    Ah – so that’s interesting. But since WordPress is generating that code how do I remove the visibility part of the style tag? And what part of the upgrade put it there?? Like I said it worked perfectly before the upgrade so there must be something in the new files to this effect.


    Okay – so I did a search through the 3.9.1 files and found the offending style in includes/media.php – removed it and the players are back. Thank you!

    But my question now is … why? Why would they code it to where the players are hidden? Makes no sense to me.

    here is the code:

    $atts = array(
    		'class'    => apply_filters( 'wp_audio_shortcode_class', 'wp-audio-shortcode' ),
    		'id'       => sprintf( 'audio-%d-%d', $post_id, $instances ),
    		'loop'     => $loop,
    		'autoplay' => $autoplay,
    		'preload'  => $preload,
    		'style'    => 'width: 100%; visibility: hidden',

    Moderator kmessinger


    Good question. I will forward this on and see if anyone knows.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    The visibility is set to hidden, but the media-element-player JS and CSS code makes it show up again with the proper player controls and so forth. This is a bug fix for a potential race condition.

    More info here:

    Specifically, the reason your players were not showing properly was not really because of the visibility hidden, but because that page at is somewhat incomplete.

    None of the mediaelementplayer JS or CSS code is showing up on that page. In fact, none of the normal WordPress header elements are. So, I suspect the problem is that your theme lacks the correct wp_head() and possibly the wp_footer() calls in the header.php and footer.php files, respectively.

    Before the ending </head>, your page needs to have this code:
    <?php wp_head(); ?>

    And before the ending </body>, this code:
    <?php wp_footer(); ?>

    These let WordPress insert things into the header and footer, like Javascript code and CSS stylesheets, etc. Those are necessary for the normal operation of these shortcodes. Not every browser supports a simple HTML5 <audio> tag, the media-element-player code included in WordPress is what makes that audio tag cross-browser.

    kmessinger – thank you for your help with this! We got it working again and I appreciate that! 🙂

    Samuel Wood – I understand and I think that is key. Since these were external loop applications I did not include the head/footer calls – and everything worked for years. Recent upgrade apparently make this necessary. Note that adding just the head call will not fix – both head and footer calls must be present for the audio shortcode to work properly.

    Thank you both for your time today, I believe this is resolved. 🙂

    I got another problem, Im missing the button shuffle and option to auto-play, is there a way to add it or i have to wait for update?:/

    Hi! This looks exactly like the problem I was having. And, yes, my markup was lacking the <?php wp_head(); ?> and <?php wp_footer() ?> codes. The site had been launched back in 2007 and is in obvious need of some tuning up!

    Thank you!!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Audio Players not showing after upgrade’ is closed to new replies.