カスタマイズされた Twitter Bootstrap テーマを使用して、Wordpress で Web サイトを実行しようとしています。
私は彼らの答えで同様の問題を見回してきましたが、ホームページのカルーセルを自動的に開始できないようです。左右の矢印をクリックするとスライドが始まりますが、スライド間隔を500に設定してもそうではないので、まだ何か問題があると思います。私が見逃しているのは非常に基本的なものに違いないと思います。
私がロードしているスクリプトのシーケンスですか(functions.phpに関連しています):
<?php
function wpbootstrap_scripts_with_jquery()
{
// Register the script like this for a theme:
wp_register_script( 'custom-script', get_template_directory_uri() . '/bootstrap/js/bootstrap.js', array( 'jquery' ) );
// For either a plugin or a theme, you can then enqueue the script:
wp_enqueue_script( 'custom-script' );
}
add_action( 'wp_enqueue_scripts', 'wpbootstrap_scripts_with_jquery' );
if ( function_exists('register_sidebar') )
register_sidebar(array(
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
?>
どうですか
<?php wp_enqueue_script("jquery"); ?>
header.php の一部ですか?
または単に根本的なエラー
<script type="text/javascript">
$(document).ready(function() {
$('#myCarousel').carousel({
interval: 500
});
$('#myCarousel').carousel('cycle');
});
</script>
よろしくお願いします。