I'm building a WordPress theme and I've used the code from https://codeinhouse.com/how-to-create-custom-post-type-slider-in-wordpress-without-plugin/ to build my slider I've also used https://github.com/wp-bootstrap/wp-bootstrap-navwalker I have both jquery and bootstrap both linked to the site they appear in inspect element however they do not seem to be running as my drop down navigation does not work on mobile size and the slider doesn't slide enter image description here

function wpbootstrap_enqueue_styles() {
    wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css' );
    wp_enqueue_style( 'my-style', get_template_directory_uri() . '/css/style.css');
    wp_enqueue_script('bootstrap-js', get_template_directory_uri() . '/js/bootstrap.js', array('jquery'), NULL, true);
    wp_enqueue_script('jquery-js', get_template_directory_uri() . '/js/jquery.js', array('jquery'), NULL, true);
add_action('wp_enqueue_scripts', 'wpbootstrap_enqueue_styles');
  • Just something to consider in future: If you inspect the HTML and see <link> and <script> tags with the correct URLs for your scripts and styles, then WordPress is properly enqueuing them. If they are not working, then that's a CSS/JavaScript problem and the issue lies outside of WordPress. So in this case if the scripts are loaded but not doing what you expected then the issue is not with WordPress and you're probably not going to get much help here, and would be better off seeking help in a more general forum. Commented May 25, 2022 at 15:04

1 Answer 1


WordPress is loading jQuery as default.

You basicly telling WordPress to load your jquery-js after the jquery script from WordPress.

The Nav_Walker class you are using is related to Bootstrap Version 3. Which Version of Bootstrap are you loading? Without knowing your code, I think I'm guessing that the Boostrap version does not cope with the current markup.

  • 1
    ahh brilliant thankyou thats helpful
    – crad98
    Commented May 25, 2022 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.