WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. scribu
    Member
    Posted 4 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
    Member
    Posted 3 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.

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic