WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. chandamon
    Member
    Posted 5 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
    http://3cmusic.com/home/?p=1321

    This is the site with exactly same code working properly
    http://www.chandamon.com/test2/?p=337

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

    Many many thanks.

  2. kmessinger
    Volunteer Moderator
    Posted 5 years ago #

  3. chandamon
    Member
    Posted 5 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!!!

    http://3cmusic.com/home/?p=1321

  4. chandamon
    Member
    Posted 5 years ago #

    please help@@

  5. Dave Doolin
    Member
    Posted 5 years ago #

    chandamon:

    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
    Moderator
    Posted 5 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
    Member
    Posted 5 years ago #

    chandamon,

    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
    Moderator
    Posted 5 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