i got this little problem …
i downloaded custom jquery UI bundle from jquery UI and i cant include it to child theme in wordpress
can u please educate me how to do this step by step because iam still not very good in coding
i try this but does not work..
<?php wp_head(); ?>
<link rel="stylesheet" type="text/css" href="<?php echo get_stylesheet_directory_uri(); ?>/js/css/jquery-ui-1.10.4.custom.min.css"/>
<script src="<?php echo get_template_directory_uri(); ?>/js/js/jquery-ui-1.10.4.custom.min.js"></script>
<script src="<?php echo get_template_directory_uri(); ?>/js/js/jquery-1.10.2.js"></script>
<script>
$(function() {
$( "#accordion" ).accordion({
collapsible: true
});
});
</script>
thank you in advance.
you should use wp_enqueue_script() in your functions.php file
You should also note that WordPress enqueues jQuery in noConflict mode, so you’ll need noConflict wrappers to be able to use $:
Then you just call wp_head() and WordPress will automatically add those javascripts to your page.
All JavaScript files should be added via
wp_enqueue_script()
and all CSS files viawp_enqueue_style()
.The codes should be added to your child themes
functions.php
file.Here is an example from the WordPress Codex: