[resolved] wp_head problem (javascript problem) (8 posts)

  1. chandamon
    Posted 7 years ago #

    In the header, once I call <?php wp_head() ?>, all the javascript applications don't work. And then I delete this line away, the apps based on javascript work. However, the GD star rating plugin doesn't work in that way maybe becoz I made mistake when I inserted the javascript of GD star rating manually...

    It's so strange that all the same codes/same files work in another site perfectly but now the 3cmusic.com gets problem with <?php wp_head() ?>.
    How can I repair this function to enable all plugins based on javascript to run properly?

    This is the site the wp_head gets problem

    This is the site with exactly same code working properly

    hope you guys can help me...I am completely baffled@@

    Many many thanks.

  2. kmessinger
    Forum Moderator
    Posted 7 years ago #

  3. chandamon
    Posted 7 years ago #

    hey thanks
    but I don't think the errors/warnings are the crux of it@@

    I believe it is wp_head and I have seen people saying they have some similar problems with jquery due to wp_head too.

    Actually to make it short, the main thing is the conflict between wp_head and other jquery applications... I put the wp_head again and now gd rating works fine but the rest like enhanced categories doesn't function...

    Please help and advise!!!


  4. chandamon
    Posted 7 years ago #

    please help@@

  5. Dave Doolin
    Posted 7 years ago #


    I'm having some sort of similar problem, javascript simply stopped working on two of my sites. This is for both the displayed web site and for the admin interface. I have installed no new plugins since javascript last worked.

    I won't tell you to RTFM... that just means I don't know the problem is myself.

    What I'm doing is copying everything down to my local wamp installation to pick it apart. That way the website doesn't go down as I remove all the plugins.

    Please post any updates.

  6. Mark / t31os

    Posted 7 years ago #

    kmessinger gave valid advice...

    Invalid markup can cause any number of problems. I'd not expect anyone to help you, unless you want to help yourself, and that starts by validating your code.

    I mean that in the nicest possible way.. :)

  7. Dave Doolin
    Posted 7 years ago #


    In my case, I'm pretty sure it's a plugin (e.g., current issue with Sociable) or a wordpress problem, because posts containing a certain piece of javascript code will work when displayed individually, but will NOT work when displayed on the front page.

    I'm not sure we are having the same specific problem with javascript, but I'll be delighted to help you in any way I can once I figure what's going wrong on my site.

  8. Mark / t31os

    Posted 7 years ago #

    If you only need the JS on single posts, then just wrap the add_action in..

    if(is_page() || is_single()) {

    So it's only activated on pages and single post pages...

Topic Closed

This topic has been closed to new replies.

About this Topic