WordPress.org

Ready to get started?Download WordPress

Forums

Force plugin javascript to load in wp_footer via functions.php (2 posts)

  1. aaron.lane
    Member
    Posted 1 year ago #

    Hello,

    We have a simple WordPress site with 4 plugins: a jQuery slider, events calendar, lightbox gallery, and translation tool. Currently, only 1 of the 4 plugins has an option in the wp_admin area to load the javascript in the header or footer.

    We know that we can force the plugins to load their javascript in the wp_footer by editing the wp_register_script function in each individual plugin. However, this method is not ideal because 1) the amount of effort required and 2) the changes will be lost each time the plugin is upgraded.

    Is there is a way to force plugins' javascript files to load in the wp_footer via our functions.php file?

    Thanks,
    Aaron

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    In a word, no. Nor is this necessarily advisable. Some plugins place their js in the header for good reason.

Topic Closed

This topic has been closed to new replies.

About this Topic