• Hi,

    I have 3 WP Article Directory sites.

    wellnessarticles4u.com
    realestatearticles4u.com
    home-business-source.com

    home-business-source.com has WP installed in the root and it
    works correctly. The other 2 have WP installed in subdirectories.

    The error is in the header and appears before the plugins
    load. Turning off the plugins does not solve the problem.

    These are the 2 links that slow down the site load when
    the WP install is in a subdirectory.

    <script type='text/javascript' src='http://www.realestatearticles4u.com/realestate-articlestrue?ver=3.4.2'></script>
    <script type='text/javascript' src='http://www.wellnessarticles4u.com/wellness-articlestrue?ver=3.4.2'></script>

    I used http://tools.pingdom.com/fpt/ to find the errors.

    I don’t understand what created the link or where it is supposed to go?

    Here is the same basic link in the root of another site that works.

    <script type='text/javascript' src='http://www.home-business-source.comtrue?ver=3.4.2'></script>

    Any suggestions?

    David

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello David.

    When loading scripts in the <head> of the document in WP, it is best to load scripts using the wp_enque_script and/or wp_register_script actions. http://codex.wordpress.org/Function_Reference/wp_enqueue_script

    The reason you might be getting this issue is because one or both of those scripts might be conflicting with the WordPress default script loading action. It could be a script dependency issue in there as well. The link above will give you more of an understanding of how WordPress handles loading scripts and why.

    Try moving those scripts out of your <head> and try running them through that action instead and test your load time again.

    Hope this helps. Good Luck.

    Thread Starter davidintc

    (@davidintc)

    Hi 3Five,

    Now I just need to find the location of the
    script that calls for that sequence.

    php and js are still pretty hard for me to understand.

    Thanks for the help,

    David

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘JS in Header Creating 404 Error’ is closed to new replies.