[英]How can I edit my home index page and other pages source file in WordPress using html?
I am having difficulty adding an HTML element to my menus on my WordPress website because I am not finding the SourceCode of my website to edit it.我在我的 WordPress 网站上的菜单中添加 HTML 元素时遇到困难,因为我找不到我网站的源代码来编辑它。 I am using WordPress with Sinatra Theme.
我正在使用 WordPress 和 Sinatra 主题。 Is it possible to edit my WordPress website source code and if not how can I add an element of HTML to my Navbar and add a CSS style to it.
是否可以编辑我的 WordPress 网站源代码,如果不能,我如何将 HTML 的元素添加到我的导航栏并向其添加 CSS 样式。
You cannot add html to build in wordpress menu.您不能在 wordpress 菜单中添加 html 来构建。 First there is PHP, second you need to create separate menu in HTML and CSS and use it instead (if you really want).
首先有 PHP,其次你需要在 HTML 和 CSS 中创建单独的菜单并使用它(如果你真的想要)。 Also if you even find a way how to implement it make sure you create child element because every time when you update WP all changes will be gone.
此外,如果您甚至找到了实现它的方法,请确保您创建了子元素,因为每次更新 WP 时,所有更改都将消失。
The second option: You need to create entire header including menu.第二个选项:您需要创建整个 header 包括菜单。 Switch off build in WP menu totaly and put new instead.
完全关闭 WP 菜单中的构建并改为使用新的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.