if ( $projects->have_posts() ) :
while ( $projects->have_posts() ) : $projects->the_post(); ?>
//document ready
$(document).ready(function(){
//Event for pushed the video
$('#your-carousel-id').carousel({
pause: true,
interval: false
});
});
jQuery( document ).ready(function( $ ) {
$('#characterLeft').text('140 characters left');
$('#message').keydown(function () {
var max = 140;
var len = $(this).val().length;
if (len >= max) {
$('#characterLeft').text('You have reached the limit');
$('#characterLeft').addClass('red');
$('#btnSubmit').addClass('disabled');
}
else {
var ch = max - len;
$('#characterLeft').text(ch + ' characters left');
$('#btnSubmit').removeClass('disabled');
$('#characterLeft').removeClass('red');
}
});
});
<?php
//Scripts
function theme_name_scripts() {
wp_enqueue_style( 'style', get_stylesheet_uri() );
wp_enqueue_script( 'jqs_script', get_template_directory_uri() .'/js/jquery-3.3.1.min.js' );
wp_enqueue_script( 'js_script', get_template_directory_uri() .'/js/script.js' );
wp_enqueue_style( 'animation', get_template_directory_uri() .'/css/animate.min.css' );
wp_register_script( 'Font_Awesome', 'https://use.fontawesome.com/releases/v5.0.8/js/all.js' );
wp_enqueue_script('Font_Awesome');
wp_register_script( 'Bootstrap', 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js' );
wp_enqueue_script('Bootstrap');
wp_register_style( 'Bootscss', 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css' );
wp_enqueue_style('Bootscss');
wp_register_script( 'Popper', 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js' );
wp_enqueue_script('Popper');
}
// Register Custom Navigation Walker
require get_template_directory() . '/wp-bootstrap-navwalker.php';
//Menu
register_nav_menu('menu', 'Menu');
add_action( 'wp_enqueue_scripts', 'theme_name_scripts', 'theme_register_nav_menu' );
remove_filter( 'the_content', 'wpautop' ); // Отключаем автоформатирование в полном посте
remove_filter( 'the_excerpt', 'wpautop' ); // Отключаем автоформатирование в кратком(анонсе) посте
remove_filter('comment_text', 'wpautop'); // Отключаем автоформатирование в комментариях
remove_filter( 'the_content', 'wpautop' ); // Отключаем автоформатирование в полном посте
remove_filter( 'the_excerpt', 'wpautop' ); // Отключаем автоформатирование в кратком(анонсе) посте
remove_filter('comment_text', 'wpautop'); // Отключаем автоформатирование в комментариях
?>
Я понимаю, что звучит это глупо, но у меня не получается инициализировать своё меню для кнопок под слайдер.