توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : لود نشدن js ها در قالب وردپرس
sonly
June 10th, 2019, 12:04
سلام
دوستان قالبی داریم که به وردپرس تبدیل می کنیم اما js ها لود نمیشن
هم در فانکشن فراخونی میکنیم اینطوره هم در فوتر باز فرقی نداره
توجه کنید که به صورت درست هم فراخوانی میشن... قالب رو میتونید تو این لینک ببنید.
ن تب ها باز میشن نه اسلایدر ها و منو در موبایل باز نمیشه...
لطفا یا راهنمایی کنید یا با دریافت هزینه ممنون میشم حل کنید. در صورت نیاز ای دی تلگرام بدین.
MehdiSele
June 10th, 2019, 12:07
با سلام دوست عزیز
شما باید لینکارو تو تنظیمات خود قالب اضافه کنید
sonly
June 10th, 2019, 12:09
با سلام دوست عزیز
شما باید لینکارو تو تنظیمات خود قالب اضافه کنید
خب دیگ مثل همیشه توی فانکشن وارد کردم لود نشد
توی فوترم باز لود نشد
قالب اختصاصیه تنظیماتی نداره
xwoman2
June 10th, 2019, 12:53
محتویات فایل custom.js رو با کد های زیر جای گزین کنید.
(function($)
{
$( document ).ready(function() {
var item = 3;
if ($(window).width < 768) {
item = 1
}
if ($(window).width < 992) {
item = 2
}
if ($(window).width > 992) {
item = 3
}
});
$('.right .flexslider').flexslider({
animation: "slide",
animationLoop: true,
autoPlay:true,
rtl: true,
itemWidth: 210,
itemMargin: 0,
minItems: item,
maxItems: 3,
animationLoop:true,
});
$('.middle .flexslider').flexslider({
animation: "slide",
rtl: true,
touch:true,
animationLoop:true
});
$('.best-slider .flexslider').flexslider({
animation: "slide",
rtl: true,
pauseText: " ",
playText: " ",
animationLoop:true,
autoPlay:true,
pausePlay: true,
prevText: " ",
nextText: " "
});
/*------------------------------*/
if ($(window).width() > 992){
$(window).scroll(function () {
var y = $(document).scrollTop();
var t = $('header .holder').offset().top;
if (y > t) {
$('header .bottom').addClass('fixed');
}
var ly = $(document).scrollTop();
var lt = $('header .holder').offset().top;
if (ly < lt) {
$('header .bottom').removeClass('fixed');
}
});
}
/*-------------------------------*/
$('.news .right .tabs li').click(function () {
var child = $(this).attr('data-tab');
$('.news .right .content .active').fadeOut();
$('.news .right .active').removeClass('active');
$('#' + child).fadeIn();
$('#' + child).addClass('active');
$(this).addClass('active');
});
$('.news .left .tabs li').click(function () {
var child = $(this).attr('data-tab2');
$('.news .left .content .active').fadeOut();
$('.news .left .active').removeClass('active');
$('#' + child).fadeIn();
$('#' + child).addClass('active');
$(this).addClass('active');
});
/*-----------------------------*/
if ($(window).width() < 992){
$('.nav-menu>ul>li').click(function () {
$(this).children('.drop-menu').slideToggle();
});
}
$('.fa.fa-bars').click(function () {
$('.nav-menu').slideToggle();
});
/*----------------------*/
$('[data-toggle="tooltip"]').tooltip();
/*------------------------------*/
$(".showModal").click(function (event) {
$(".modal").show();
var x = $(event.currentTarget).attr("src");
$("#modalImg").attr("src", x);
console.log(x);
});
$("#overlay").click(function () {
$(".modal").hide();
});
})( jQuery );
sonly
June 10th, 2019, 12:55
محتویات فایل custom.js رو با کد های زیر جای گزین کنید.
(function($)
{
$( document ).ready(function() {
var item = 3;
if ($(window).width < 768) {
item = 1
}
if ($(window).width < 992) {
item = 2
}
if ($(window).width > 992) {
item = 3
}
});
$('.right .flexslider').flexslider({
animation: "slide",
animationLoop: true,
autoPlay:true,
rtl: true,
itemWidth: 210,
itemMargin: 0,
minItems: item,
maxItems: 3,
animationLoop:true,
});
$('.middle .flexslider').flexslider({
animation: "slide",
rtl: true,
touch:true,
animationLoop:true
});
$('.best-slider .flexslider').flexslider({
animation: "slide",
rtl: true,
pauseText: " ",
playText: " ",
animationLoop:true,
autoPlay:true,
pausePlay: true,
prevText: " ",
nextText: " "
});
/*------------------------------*/
if ($(window).width() > 992){
$(window).scroll(function () {
var y = $(document).scrollTop();
var t = $('header .holder').offset().top;
if (y > t) {
$('header .bottom').addClass('fixed');
}
var ly = $(document).scrollTop();
var lt = $('header .holder').offset().top;
if (ly < lt) {
$('header .bottom').removeClass('fixed');
}
});
}
/*-------------------------------*/
$('.news .right .tabs li').click(function () {
var child = $(this).attr('data-tab');
$('.news .right .content .active').fadeOut();
$('.news .right .active').removeClass('active');
$('#' + child).fadeIn();
$('#' + child).addClass('active');
$(this).addClass('active');
});
$('.news .left .tabs li').click(function () {
var child = $(this).attr('data-tab2');
$('.news .left .content .active').fadeOut();
$('.news .left .active').removeClass('active');
$('#' + child).fadeIn();
$('#' + child).addClass('active');
$(this).addClass('active');
});
/*-----------------------------*/
if ($(window).width() < 992){
$('.nav-menu>ul>li').click(function () {
$(this).children('.drop-menu').slideToggle();
});
}
$('.fa.fa-bars').click(function () {
$('.nav-menu').slideToggle();
});
/*----------------------*/
$('[data-toggle="tooltip"]').tooltip();
/*------------------------------*/
$(".showModal").click(function (event) {
$(".modal").show();
var x = $(event.currentTarget).attr("src");
$("#modalImg").attr("src", x);
console.log(x);
});
$("#overlay").click(function () {
$(".modal").hide();
});
})( jQuery );
سلام ممنون قبلا اینو تست کردم بازم تست کردم اگر ببنید هیچ تغییری نکرد.
xwoman2
June 10th, 2019, 13:03
دوست عزیز باید jquery رو به عنوان پیشنیاز این اسکریپتی که نوشتید لود کنید.
function LoadStyle()
{
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', get_template_directory_uri().'/js/jquery-3.4.1.min.js', array(), '3.4.1' );
wp_enqueue_script('custom', get_template_directory_uri().'/js/custom.js', array('jquery'), null, true);
}
add_action( 'wp_enqueue_scripts', 'LoadStyle' );
این تابع میاد جی کوئری پیش فرض وردپرس رو آنلود میکنه و جی کوئری ورژن خاصی که مد نظر شماست رو به عنوان پیشنیاز لود میکنه.با توجه به نیاز خودتون تغییرش بدید.اگر از بوت استرپ ۴ استفاده میکنید آخرین ورژن که همین ۳.۴.۱ هست رو بگیرید.
sonly
June 10th, 2019, 13:21
دوست عزیز باید jquery رو به عنوان پیشنیاز این اسکریپتی که نوشتید لود کنید.
function LoadStyle()
{
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', get_template_directory_uri().'/js/jquery-3.4.1.min.js', array(), '3.4.1' );
wp_enqueue_script('custom', get_template_directory_uri().'/js/custom.js', array('jquery'), null, true);
}
add_action( 'wp_enqueue_scripts', 'LoadStyle' );
این تابع میاد جی کوئری پیش فرض وردپرس رو آنلود میکنه و جی کوئری ورژن خاصی که مد نظر شماست رو به عنوان پیشنیاز لود میکنه.با توجه به نیاز خودتون تغییرش بدید.اگر از بوت استرپ ۴ استفاده میکنید آخرین ورژن که همین ۳.۴.۱ هست رو بگیرید.
این مورد هم تست شد اما مشکل حل نشد.
xwoman2
June 10th, 2019, 13:24
باید قالب رو ببینم.در صورت تمایل تلگرام در ارتباط باشید.
sonly
June 10th, 2019, 13:25
باید قالب رو ببینم.در صورت تمایل تلگرام در ارتباط باشید.
بهتون پیام دادم.
لطفا بررسی کنید.
ممنون
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.