简体   繁体   English

在WordPress高级主题上自定义WordPress标头导航菜单

[英]Customizing WordPress Header Navigation Menu on WordPress Premium Theme

I have been encountering a problem on my WordPress premium theme on its navigation menu on header. 我在标题的导航菜单上的WordPress高级主题遇到了问题。 When it is clicked it will not redirect to the destined page. 单击它不会将其重定向到目标页面。 I have been working to fix it on Google Chrome element editor and finally solved the problem by editing some element on Google Chrome element editor. 我一直在努力在Google Chrome元素编辑器上修复它,最后通过在Google Chrome元素编辑器上编辑某些元素来解决了该问题。

Before 之前

<li id="menu-item-2011" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home current-menu-item page_item page-item-1076 current_page_item menu-item-2011"><a href="http://stagjurnal.dev/">Home</a></li>

After

<li id="menu-item-2011" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home current-menu-item page_item page-item-1076 current_page_item menu-item-2011"><a href="http://stagjurnal.dev/" **onclick="location.replace('http://stagjurnal.dev/'),'_top'"**>Home</a></li>

My question is, I can't find the file where I have to edit and input my code as I am not familiar with WordPress file structure, and when I try to search for the id="menu-item-2011", on the project folder it can't be found for some reason. 我的问题是,由于我不熟悉WordPress文件结构,并且当我尝试搜索id =“ menu-item-2011”时,我找不到需要编辑和输入代码的文件。项目文件夹,由于某种原因找不到。

I have tried to contact the developer of the theme but they don't even reply to my email, though I have tried to fix this myself. 我曾尝试与主题开发者联系,但他们甚至都没有回复我的电子邮件,尽管我已尝试自己解决此问题。 The theme is called Enigma ( https://themeforest.net/item/enigma-minimal-multipurpose-wordpress-theme/18298127 ). 该主题称为Enigma( https://themeforest.net/item/enigma-minimal-multipurpose-wordpress-theme/18298127 )。

尝试查看header.php文件,通常与该文件头有关的所有文件都应放在其中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM