admin管理员组文章数量:1429432
I am fairly new to Wordpress. I have been setting up sites using a template in a multisite installation. On the home page, one of the links "Twin Tiers Saves" is unresponsive but it shows in the bottom left corner of the page without the "http://" necessary for navigation. The link should open a new tab but when I click it nothing happens. The link works on all other pages except the homepage. The site is here: /. Does anyone have any advice on how to get this menu item functioning correctly? Thanks in advance for your help.
I am fairly new to Wordpress. I have been setting up sites using a template in a multisite installation. On the home page, one of the links "Twin Tiers Saves" is unresponsive but it shows in the bottom left corner of the page without the "http://" necessary for navigation. The link should open a new tab but when I click it nothing happens. The link works on all other pages except the homepage. The site is here: https://capcityradio/staging/. Does anyone have any advice on how to get this menu item functioning correctly? Thanks in advance for your help.
Share Improve this question edited Jun 11, 2019 at 19:27 RiddleMeThis 3,8078 gold badges22 silver badges30 bronze badges asked Jun 11, 2019 at 15:54 Charles J. BarnettCharles J. Barnett 32 bronze badges 1- It is the menu link "Twin Tier Saves". I have narrowed it down to line #1985 in the jquery.js?ver=1.12.4-wp file. I am new to wordpress so any help that you can give is much appreciated. Thanks – Charles J. Barnett Commented Jun 11, 2019 at 18:46
1 Answer
Reset to default 0This function in /themes/lucid-press-child/js/custom-js.js
is your problem.
function homepageNavigationClasses(){
if(jQuery('body.home').length){
//jQuery('#navigation a').not('.sub-menu a').click(function(event){
jQuery('#navigation a').click(function(event){
var clickedLink = jQuery(this).text();
clickedLink = clickedLink.replace(/\s/g,'');
if(!jQuery(this).parent().hasClass('page')){
event.preventDefault();
//console.log(clickedLink);
jQuery('html, body').animate({
scrollTop: jQuery("#"+clickedLink).offset().top - 400
}, 500);
jQuery('#navigation li').removeClass('active-hp-section');
jQuery(this).parent().addClass('active-hp-section');
}
});
}
}
It's looking for a ID to scroll the page too but it doesn't have one because its an external link.
You could create a child theme and re-write the function. But the following solution is probably simpler.
Go to Admin > Appearance > Customize > Menus
and manually add the page
class to the "CSS Classes" field. This will add the class to the list item of the link and now your link will function as normal.
本文标签: multisiteHomepage Menu Link Won39t Function
版权声明:本文标题:multisite - Homepage Menu Link Won't Function 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745412599a2657537.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论