wordpress:如何使用自定义 HTML 文件创建新帖子? [英] wordpress : how to use a custom HTML file to create a new post?
本文介绍了wordpress:如何使用自定义 HTML 文件创建新帖子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我通过在
/wp-content/themes
类似:
<?php
*
* Template Name: Contact Page
*/
?>
<html ..... </html>
然后在仪表板上添加一个新页面,选择这个新模板
and then adding a new page on the dashboard selecting this new template
问题是我无法将标签和类别关联到每个页面.我显然需要创建帖子.那么我如何从自定义 html 文件创建帖子?
The problem is i cannot associate tags and categories to each pages. i would need apparently instead to create posts. How could i then create posts from a custom html file ?
推荐答案
使用自定义帖子类型并创建一个单{posttype}.php
Use custom post types and create a single-{posttype}.php
我认为这将解决您的问题.
I think this will solve your problem.
这篇关于wordpress:如何使用自定义 HTML 文件创建新帖子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文