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

  • Home
  • SEARCH
  • 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 7023445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:42:43+00:00 2026-05-27T23:42:43+00:00

According to the WordPress codex , the wp_head(); should be located right before the

  • 0

According to the WordPress codex, the wp_head(); should be located right before the closing head tag.

When I insert the code after the wp_head(); it works. But when I insert it before wp_head(); as it should be, it results in a blank space. Look at the picture to see what Firebug sais when it goes blank.

This is the code:

<link rel="stylesheet" href="flexslider/flexslider.css" type="text/css" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script src="flexslider/jquery.flexslider.js"></script>

<script type="text/javascript" charset="utf-8">   $(window).load(function() {
    $('.flexslider').flexslider({

         slideshow: true,
         controlNav: false,
         directionNav: false,   animation: "slide",     slideshowSpeed: 4500,   animationDuration: 600,   

             });   }); </script>

Firebug: enter image description here

How come is that? Any ideas?

  • 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-05-27T23:42:44+00:00Added an answer on May 27, 2026 at 11:42 pm

    Yes, wp_head() should be before </head>, but your javascript code should be before </body>.

    Javascript is always recommended to be put in the end of the DOM. In case that is not possible (e.g. specific javascript must be loaded before the DOM, which does not seem to be true in your case) , put it before </head> and after wp_head();

    EDIT

    Also, what I noticed in your case is that your main script might not be accessible if you are using SEO friendly urls. You should specify absolute url.

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

Sidebar

Related Questions

According to the WordPress wiki pages on developing themes, I have to call wp_head()
According to what I have found so far, I can use the following code:
According to Five Simple Database Design Errors You Should Avoid by Anith Sen, using
According the Wordpress' doc, when we create theme, we need to create style.css file
According to the msdn.microsoft.com site, .NET 3.5 Routing should work under IIS6 and II7
According to the CSS 2.1 standard, the vertical margins of floating elements should not
Querying wordpress posts according to their tags can look like this (if I pieced
I was asked to install numerous WordPress sites in IIS. I'm wondering, should try
According to this discussion , the iphone agreement says that it doesn't allow loading
According to the manual , git dcommit will create a revision in SVN for

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.