Hallo,

Ik he geprobeerd om bootstrap te installeren op Wordpress
ik heb deze code toegevoegd in function.php:


function garage_stylesheets() {   
 
  
 wp_register_style( 'style.css',  get_template_directory_uri() . '/style.css', array(), null, 'all' );    
    wp_enqueue_style( 'style.css' );

wp_register_style( 'bootstrap.min.css',  get_template_directory_uri() . '/bootstrap.min.css', array(), null, 'all' );    
    wp_enqueue_style( 'bootstrap.min.css' );
}
add_action( 'wp_enqueue_scripts', 'garage_stylesheets' );



plus deze code in function.php:


function garage_scripts() {
wp_enqueue_script( 'garage-jquery.min.js', get_template_directory_uri() . '/js/jquery.min.js', array(), '20151215', true );
wp_enqueue_script( 'garage-tether.min.js', get_template_directory_uri() . '/js/tether.min.js', array(), '20151215', true );
wp_enqueue_script( 'garage-bootstrap.min.js', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '20151215', true );
wp_enqueue_script( 'garage-scripts.min.js', get_template_directory_uri() . '/js/scripts.min.js', array(), '20151215', true );

	
	wp_enqueue_script( 'garage-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );

	wp_enqueue_script( 'garage-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );

	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
		wp_enqueue_script( 'comment-reply' );
	}
}
add_action( 'wp_enqueue_scripts', 'garage_scripts' );



plus deze scripts in footer.php:


<script src="js/jquery.min.js"></script>
<script src="js/tether.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/scripts.min.js"></script>
</body>
</html>


nu als ik ga naar mij website om te testen of alles is OK .

ik open inspect elements op mij website en ik zie deze fout meldingen:


Uncaught Error: Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0
    at bootstrap.min.js:6
    at bootstrap.min.js:6
jquery.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
tether.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
scripts.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
bootstrap.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
scripts.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
webdesignleren.net/:1 Refused to execute script from 'http://blog.zx2c4.com/api/get_recent_posts/?include=url,title,date,comment_…_format=c&callback=jQuery1900584878062520682_1494157034903&_=1494157034904' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
/srv/www/cgi-bin/git.cgi Failed to load resource: the server responded with a status of 404 (Not Found)
/reparatie-ondehoud/cgi-bin/projects.cgi Failed to load resource: the server responded with a status of 404 (Not Found)


mij url is :http://webdesignleren.net/

wat ik moet doen precies om deze fout te corrigeren?

dank u wel
johannes
Zou je de titel kunnen aanpassen die je vraag/probleemstelling aanduidt? Een lange error melding helpt niet echt hierbij, en kan je beter in de het bericht vermelden.

Verder is de error vrij duidelijk dat je een oude jQuery gebruikt. Dus... upgraden die boel. De rest van die 404's betekent dat die scripts niet gevonden zijn.
dank u wel ,
ik heb het probleem opgelost als volgende manier:



<?php
/**
 * The header for our theme.
 *
 * This is the template that displays all of the <head> section and everything up until <div id="content">
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package Garage
 */

?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">

<link href="https://fonts.googleapis.com/css?family=Merriweather" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/script.js/2.5.8/script.min.js"></script>
<?php wp_head(); ?>
</head>



hartelijke bedankt
johannes

Reageren