Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8220909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:42:56+00:00 2026-06-07T13:42:56+00:00

Is there any disadvantage to using wp_footer as the hook when enqueuing javascript files

  • 0

Is there any disadvantage to using wp_footer as the hook when enqueuing javascript files in a wordpress theme? I have about 5 files that I want to be enqueued in the footer but setting the wp_enqueue_script property for footer to true isn’t doing anything.

I have wp_footer() in my footer file and when I change the action to:

add_action('wp_footer', 'extra_scripts');

the scripts load fine in the footer. This is just for a demo and not anything more than just a front end display. Is there anything wrong with doing it this way to load the scripts in the footer?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T13:42:59+00:00Added an answer on June 7, 2026 at 1:42 pm

    You should enque what you can in the footer.
    To force this use:

    // force all JS to the footer
    remove_action('wp_head', 'wp_print_scripts');
    remove_action('wp_head', 'wp_print_head_scripts', 9);
    remove_action('wp_head', 'wp_enqueue_scripts', 1);
    add_action('wp_footer', 'wp_print_scripts', 5);
    add_action('wp_footer', 'wp_enqueue_scripts', 5);
    add_action('wp_footer', 'wp_print_head_scripts', 5);
    

    This way you can use the default wp_enqueue_scripts
    Do remember that some scritps need to be in the <head> like the HTML5 script of twentyeleven/twentyten

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have seen developers using WITH(nolock) in the query, is there any disadvantage of
Can someone confirm that for a 32bit system: Is there any disadvantage in using
Is there any particular advantage/disadvantage in JavaScript memory consumption between using location.href = url
Is there any disadvantage of using URL expiring concept to protect online videos?
IIS6 http compression with ASP.NET: is there any disadvantage especially when using ajax updatepanel
Is there any native compression (for javascript/css files) available in ASP.NET?
Is there any disadvantage to using char for small integers in C? Are there
Is there any disadvantage on using shared hosting in general (of discountasp.net) for an
Is there any advantage or disadvantage to using .info domain names? They are certainly
Is there any SEO disadvantage in using a subdomain to host a blog on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.