Including files in Child Themes

get_template_directory looks in the parent theme for files. In the case a child theme is being used, the absolute path to the parent theme directory will be returned. Use get_stylesheet_directory() to get the absolute path to the child theme directory. http://codex.wordpress.org/Function_Reference/get_template_directory This file is not meant to be replaced. You will need to find another … Read more

jquery-ui-autocomplete is not loaded with wp_enqueue_script

Are you sure it is not loading? I tried this(using WordPress 3.6-beta1): function add_scripts(){ wp_enqueue_script( ‘jquery-ui-autocomplete’ ); } add_action(‘wp_enqueue_scripts’, ‘add_scripts’); I got jQuery and jQuery migrate in the header: <script type=”text/javascript” src=”http://localhost/wordpress/wp-includes/js/jquery/jquery.js?ver=1.9.1″></script> <script type=”text/javascript” src=”http://localhost/wordpress/wp-includes/js/jquery/jquery-migrate.js?ver=1.1.1″></script> And jQuery UI in the footer: <script type=”text/javascript” src=”http://localhost/wordpress/wp-includes/js/jquery/ui/jquery.ui.core.min.js?ver=1.10.2″></script> <script type=”text/javascript” src=”http://localhost/wordpress/wp-includes/js/jquery/ui/jquery.ui.widget.min.js?ver=1.10.2″></script> <script type=”text/javascript” src=”http://localhost/wordpress/wp-includes/js/jquery/ui/jquery.ui.position.min.js?ver=1.10.2″></script> <script type=”text/javascript” src=”http://localhost/wordpress/wp-includes/js/jquery/ui/jquery.ui.menu.min.js?ver=1.10.2″></script> <script type=”text/javascript” … Read more

Enqueue Google CDN jQuery in Footer

The right hook The wp_default_scripts-hook only runs in the admin as it’s called by wp_default_scripts() on ~/wp-admin/load-scripts.php where it’s hooked at the end of the file. So to move jQuery in public to the footer, you have to use a different hook: wp_enqueue_scripts, which only runs in the public. No admin check needed. <?php defined( … Read more

Add js into a theme [closed]

Your code should look like this function my_scripts_styles() { wp_register_script(‘easing’, get_template_directory_uri() . ‘/js/easing.js’, ‘2014-12-030’, true ); wp_enqueue_script(‘easing’); } add_action( ‘wp_enqueue_scripts’, ‘my_scripts_styles’ ); The above code should work fine. Also don’t forget to check if you have properly specified the path to your js file. Check well that you have a functions.php and not function.php file. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)