get child theme path in wordpress 1

get child theme path in wordpress

get_stylesheet_directory() oR 
get_theme_file_uri()

Here is what the above code is Doing:
1. It’s registering a new script called ‘main-university-js’
2. It’s telling WordPress where to find the script (get_theme_file_uri() is a function that returns the URL of the file)
3. It’s telling WordPress that the script depends on jQuery (which is a JavaScript library that WordPress loads by default)
4. It’s telling WordPress that the script should be loaded in the footer (which is the best practice)
5. It’s telling WordPress that the script should be loaded on every page of the site

Similar Posts