简体   繁体   English

如何使用 html 编辑 WordPress 中的主页索引页和其他页面源文件?

[英]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.

相关问题 我的Javascript Ajax请求可在Phonegap index.html中使用,但不能在其他任何页面中使用,如何解决此问题? - My Javascript Ajax request works in Phonegap index.html but not in any other pages, how can I fix this? 我如何让我的index.htm文件包含其他html文件 - How can I have my index.htm file include other html files 为什么我不能在 Wordpress 上编辑页面的 html? - Why can't I edit the html of a page on Wordpress? 我可以在github页面站点中提供一个javascript文件而不是index.html吗? - Can I serve a javascript file instead of index.html in my github pages site? 我在 heroku 上的反应应用程序打开主页但不会打开其他页面 - My react app on heroku opens home page but will not open other pages 我的主页总是呈现在所有其他页面之上,就像我在登录时一样,我的主页数据首先呈现为单页中的 2 页 - My home page is always rendering above every other page ,like when i am on signin my home page data is rendered first like 2 pages in single page 如何编辑WordPress主题的索引页? - How to edit the index page of wordpress theme? 如何获取其他页面内HTML页面中字段的值 - How can I get access to value of a field in a HTML page inside other pages 如何将 Gatsby 站点的索引页面设置为动态生成的页面之一? - How can I set the index page of my Gatsby site to be one of the dynamically generated pages? 如何配置我的webpack.config.js文件以正确导航到其他html页面? - How would I configure my webpack.config.js file to properly navigate to other html pages?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM