php 如何将 HTML 页面集成到 WordPress 中?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11027642/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to integrate HTML pages into WordPress?
提问by capri
I have a page in HTML(index.html), and a folders named images, css, js that used in it.
我有一个 HTML(index.html) 页面,以及一个名为 images、css、js 的文件夹,其中使用了它。
Now i have to do this in WordPress. Is there any plug in to convert Html to WordPress or any other way to do this in WordPress? Please help me.. i'm a beginner in WordPress.
现在我必须在 WordPress 中执行此操作。是否有任何插件可以将 Html 转换为 WordPress 或在 WordPress 中以任何其他方式执行此操作?请帮助我.. 我是 WordPress 的初学者。
采纳答案by Aniket
I am not sure of a direct way to implement a HTML page into a WordPress theme, but if you have made headerand footerfiles for your website, then all you need to do is convert them to make them WordPress compatible.
我是不知道实现HTML页面转换为WordPress主题直接的方式,但如果你已经header和footer你的网站文件,那么所有你需要做的就是将它们转换,使他们WordPress的兼容。
You should refer to the codex.
你应该参考codex。
You can also go for any of the WordPress frameworks listed here.
您还可以选择此处列出的任何 WordPress 框架。
A WordPress theme is easy to understand if you know basic PHP. It has a set of files like
如果您了解基本的 PHP,WordPress 主题很容易理解。它有一组文件,如
- header.php // header file
- footer.php // footer file
- index.php // the index file
- page.php // for your WP pages
- single.php // for your WP posts
- and some other files
- header.php // 头文件
- footer.php // 页脚文件
- index.php // 索引文件
- page.php // 用于您的 WP 页面
- single.php // 用于您的 WP 帖子
- 和其他一些文件
Go through the codex and it shouldn't take long to get the hang of it.
仔细阅读手抄本,很快就会掌握它的窍门。
回答by Jeff Daly
You need http://themematcher.com/
It'll automatically take your site, styles, images etc and create a wordpress theme for you. Check it out
它会自动获取您的网站、样式、图像等,并为您创建一个 wordpress 主题。一探究竟
回答by Henrik Harju
Theres really only three ways:
其实只有三种方式:
- Hire a freelancer
- Convert manually by referring to http://codex.wordpress.org/
- Use an automated converter. Best one on the market is https://htmltowordpress.io
- 聘请自由职业者
- 参考http://codex.wordpress.org/手动转换
- 使用自动转换器。市场上最好的一个是 https://htmltowordpress.io
回答by Libin
Search for HTML to WordPress theme conversion and you can find so many good tutorials.
搜索 HTML 到 WordPress 主题转换,你可以找到很多好的教程。
Check this article: http://thethemefoundry.com/blog/html-wordpress/
回答by Zahid Khan
here is the link for complete solution of this problem. http://wordpress.org/support/topic/how-to-integrate-htmlphp-page-to-wordpres?replies=6
这是此问题的完整解决方案的链接。 http://wordpress.org/support/topic/how-to-integrate-htmlphp-page-to-wordpres?reply=6
make sure to add /* Template Name: Custom Page Template */ piece of code in index.php page at top in your selected theme folder, not on ur main index.php file.
确保在您选择的主题文件夹顶部的 index.php 页面中添加 /* 模板名称:自定义页面模板 */ 一段代码,而不是在您的主 index.php 文件中。

