[Plugin: Audio Player] Embed scripts in footer (2 posts)

  1. scribu
    Posted 6 years ago #

    Just wanted to let people know that it's possible to load all the scripts in the footer, to speed up page load.

    Just open audio-player.php and replace this:

    add_action("wp_head", array(&$this, "addHeaderCode"));

    with this:

    add_action("wp_footer", array(&$this, "addHeaderCode"));

    It works on my site, but I'm not making any guarantees.

    It would be nice if it loaded the script only when there was an audio player on the page.

    Great plugin, otherwise!

  2. TheDailyDG
    Posted 5 years ago #

    This did work for me and so far the player doesn't seem to be affected.

    I was trying to speed up my home page and YSlow signalled Audio Player's script was in the head. So I put it in the footer now.


Topic Closed

This topic has been closed to new replies.

About this Topic