I have registered the following scripts in functions.php:
function jpmscripts() {
wp_register_script( 'adin-slider', get_template_directory_uri() . '/inc/js/adin-slider.js', array('jquery') );
wp_register_script( 'waypoints', get_template_directory_uri() . '/inc/js/jquery.waypoints.min.js', array('jquery') );
wp_register_script( 'skrollr', get_template_directory_uri() . '/inc/js/skrollr.min.js', array('jquery') );
wp_register_script( 'hammer', get_template_directory_uri() . '/inc/js/hammer.min.js', array('jquery') );
wp_register_script( 'jquery-hammer', get_template_directory_uri() . '/inc/js/jquery.hammer.js', array('jquery') );
wp_register_script( 'imagesloaded', get_template_directory_uri() . '/inc/js/imagesloaded.js', array('jquery') );
wp_register_script( 'jpm-home-js', get_template_directory_uri() . '/inc/js/jpm-home.js', array('jquery') );
wp_register_script( 'jpm-first-js', get_template_directory_uri() . '/inc/js/jpm-first.js', array('jquery') );
wp_register_style( 'jpm-home-css', get_template_directory_uri() . '/inc/css/jpm-home.css');
wp_register_style( 'jpm-first-css', get_template_directory_uri() . '/inc/css/jpm-first.css');
}
add_action( 'wp_enqueue_scripts', 'jpmscripts' );
And i have create a template file in my theme then i want to call my styles and scripts.i do
<?php
/*
Template Name: first
*/
?>
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="main">
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta http-equiv="X-UA-Compatible" content="IE=10" />
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php wp_head(); ?>
<?php
wp_enqueue_style( 'sparkling-bootstrap');
wp_enqueue_style( 'jpm-home-css' );
wp_enqueue_script( 'imagesloaded' );
echo "string";
?>
</head>
<body>
<div id="loading" class="loading">
...
But nothing loaded. any styles any scripts.... pls help me.... im getting crazy
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire