Where are wordpress js files located?

I got a complete WP site to maintain (with many plugins). But after updating it, there was a script error appeared on a WP page at index.php. How can I edit it? I cant find a file that generates the script.

This is a skeleton of the page:

Read More
meta...

links...
        <script type="text/javascript">
    /*somescript....*/  
    </script>

    <style type="text/css">
style...
    </style>
    <!--[if gte IE 9]>
        <style type="text/css">
            .gradient {
                filter: none;
            }
        </style>
    <![endif]-->

style...
<!-- <meta name="vfbPro" version="2.4.6" /> -->
<!-- We need this for debugging -->
<!-- Responsive 1.9.7.2 -->
...

body...
<!-- start WPPA+ Footer data -->
...
<!-- end WPPA+ Footer data -->

<!-- Do user upload -->
<!-- Done user upload -->
<!-- Custom Scripts -->
<script type="text/javascript">
<!--
jQuery(document).ready(function($) {
        /*ERROR HERE
        Cannot read property 'messages' of undefined 
        */
        jQuery.extend(jQuery.validator.messages, {
            required: "Ezt a mezőt kötelező kitölteni!",
            email: "Kérem adjon meg valós e-mail címet!",
            phone: "Kérem  adjon meg valós telefonszámot!"
        });
$("img.lazy").lazyload({ 
    failure_limit : 10
});
});
//-->
</script>
<script type='text/javascript'>
/* <![CDATA[ */
var _popup_data = {"ajaxurl":"http://staregeszseg.hu/wp-admin/admin-ajax.php","do":"get-data"};
/* ]]> */
</script>
<script type='text/javascript'>
/* <![CDATA[ */
var wc_add_to_cart_params = {"ajax_url":"/wp-admin/admin-ajax.php","ajax_loader_url":"//staregeszseg.hu/wp-content/plugins/woocommerce/assets/images/ajax-loader@2x.gif","i18n_view_cart":"Kosu00e1r megtekintu00e9se","cart_url":"http://staregeszseg.hu/kosar/","is_cart":"","cart_redirect_after_add":"no"};
/* ]]> */
</script>
<script type='text/javascript'>
/* <![CDATA[ */
var woocommerce_params = {"ajax_url":"/wp-admin/admin-ajax.php","ajax_loader_url":"//staregeszseg.hu/wp-content/plugins/woocommerce/assets/images/ajax-loader@2x.gif"};
/* ]]> */
</script>

<script type='text/javascript'>
/* <![CDATA[ */
...cdata
/* ]]> */
</script>
...plugins scripts
    <script type="text/javascript">
        /*somescript....*/
    </script>
many <li> elements...

Not the error is my problem, but I cant edit source, because I don’t know where is it (Custom Scripts part) actually.

Related posts

Leave a Reply

2 comments

  1. In your root folder, there should be a wp-content/themes/yourTheme folder. Now, depending on a theme there should either be a js folder with separate js files, or this really is in index.php (unlikely), which is located in yourTheme folder.

  2. I have found 2 ways of finding it:

    • text search using ftp client (or downloading all files to local to make search faster)
    • sometimes css (not sure about js) data is stored in the wp-database (note: very bad practice), so I had to go to wp-admin -> appearance, and it was there.