简体   繁体   English

如何将包含表单的 HTML 或 PHP 文件添加到 Wordpress 中?

[英]How to add a HTML or a PHP file, that includes a form, into Wordpress?

I am currently working on a Wordpress project for fun.我目前正在从事一个 Wordpress 项目,以求乐趣。 My current problem is, that I don't know how to insert my html/php pages in to WordPress so the users could see them and I could for example, get the POST data for my queries.我目前的问题是,我不知道如何将我的 html/php 页面插入到 WordPress 中,以便用户可以看到它们,例如,我可以为我的查​​询获取 POST 数据。

you can create a custom Template page, that contain what you like and save it into your current theme folder,您可以创建一个自定义模板页面,其中包含您喜欢的内容并将其保存到您当前的主题文件夹中,

<?php /* Template Name: MyPage */ 
//do what you like
?>

after you in backend you can add a new page and select your new Template in Page's attributes->Model在后端之后,您可以添加一个新页面并在页面的属性->模型中选择您的新模板

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

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