Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End WordPress / Javascript problemo

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #27137
    BLUEBIRD
    Member

    Hey, anyone got some ideas?

    I have moved a static site into WordPress, adding an additional page for posts.
    I had javascript on the original site and it all worked when I moved it across.
    Now some of the javascript is working, others not. This was kind of sudden as it was all working yesterday.
    I was trying to get a pageloader to work, couldn’t. But I am pretty sure I have removed all traces of that.

    I am not sure what I am doing wrong. I think it might be something to do with including some of the code in the head?
    Here is my header code:

    Code:

    >










#67945
AshtonSanders
Participant

You don’t have the wp_head(); tag… The wp_enqeue_script("jquery"); just says "Make sure to include Jquery when you spit out the wp_head… but you still need to put this code after that:

Code:

If you are still having trouble, after that:

Enable Firebug and tell me what error you are getting.
If you are getting the "$ is not a function error" you are having the exact same problem I am.

My "band-aid solution" is to include JQuery again after my wp_head():

Code:

I’ll probably have to post my own topic about it soon…

#67948
BLUEBIRD
Member

Thanks Ashton,

I ended up using your ‘bandaid’ solution before I read the post.
It worked, but I will return to the project and try the other option.
I would like to do best practice if I can.

Thanks for the reply though,

BLUEBIRD

#67951
AshtonSanders
Participant

Yea… just for emphasis:

If you have any plugins that need something in the head area (SEO, JS, etc.), that wp_head function is what does it. So not having that in the head will be the easiest way to break a plugin ;)

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Back End’ is closed to new topics and replies.