Home › Forums › Dzen WordPress Theme › WordPress 4.5.1 Issues
This topic contains 4 replies, has 2 voices, and was last updated by ab-themes 8 years ago.
Since updating to WordPress 4.5.1 any Youtube or Google Maps element on the home page is not displaying (blank space where the element should be). I have confirmed I have the latest version of the theme available installed (2.0.0).
It seems the issue is more complex than first thought. I have been able to resolve some issues by replacing http:// in the page source with https:// however elements on the pages (portfolio, teams and blogs) are intermittently appearing and disappearing each time the page is loaded or reloaded. Also the size of the revolution slider is not behaving consistently. It should be filling the whole screen, but on some loads of the page it only fills two thirds. This behaviour has been confirmed in multiple browsers.
Hi there,
first of all, we see that your have javascript error
Syntax error, unrecognized expression: #main_menu a[href=#dz_main_slider]
so please open your custom.js file
(you can fint it here \wp-content\themes\dzen\js\custom.js) and on line 87 you have this code:
$('body.home.page').find('.tcvpb_section_tc').each(function(){
var $section = $(this);
var section_id = $(this).attr("id");
var $menu_item;
$section.waypoint({
handler: function(direction){
if(section_id!==undefined){
$('.current-menu-item').removeClass('current-menu-item').removeClass('current-menu-ancestor');
if(direction==='down'){
$menu_item = $('#main_menu a[href=#'+section_id+']').parent();
if($menu_item.length>0){
$menu_item.addClass('current-menu-item');
}
else{
$('#main_menu .current_page_item').addClass('current-menu-item');
}
}
else if(direction==='up'){
var previous_section_id = $section.prevAll('[id]:first').attr('id');
$menu_item = $('#main_menu a[href=#'+previous_section_id+']').parent();
if($menu_item.length>0){
$menu_item.addClass('current-menu-item');
}
else{
$('#main_menu .current_page_item').addClass('current-menu-item');
}
}
}
},
offset: 150
});
});
Replace that code with this:
$('body.home.page').find('.tcvpb_section_tc').each(function(){
var $section = $(this);
var section_id = $(this).attr("id");
var $menu_item;
$section.waypoint({
handler: function(direction){
if(section_id!==undefined){
$('.current-menu-item').removeClass('current-menu-item').removeClass('current-menu-ancestor');
if(direction==='down'){
$menu_item = $('#main_menu a[href="#'+section_id+'"]').parent();
if($menu_item.length>0){
$menu_item.addClass('current-menu-item');
}
else{
$('#main_menu .current_page_item').addClass('current-menu-item');
}
}
else if(direction==='up'){
var previous_section_id = $section.prevAll('[id]:first').attr('id');
$menu_item = $('#main_menu a[href="#'+previous_section_id+'"]').parent();
if($menu_item.length>0){
$menu_item.addClass('current-menu-item');
}
else{
$('#main_menu .current_page_item').addClass('current-menu-item');
}
}
}
},
offset: 150
});
});
Difference is only in double quotes in two spots where a[href="#'
is.
Try know, if you still have same issues, let us know.
Cheers
The file you’re referencing doesn’t contain the code you’re referring to. I did find something very similar at line 31 and adding the double quotes as per your example above seems to have resolved the issue.
Great, that is because we don’t have access to your files, we looked in code on our server because is very similar :)
Cheers
The topic ‘WordPress 4.5.1 Issues’ is closed to new replies.