WordPress默认情况下不会在帖子/页面内容中执行PHP,除非它具有简码。
最快,最简单的方法是使用一个插件,使您可以运行嵌入在帖子内容中的PHP。
在没有插件的情况下,还有另外两种“快速简便”的方法可以完成此任务:
将其设置为简码 (输入
functions.php
并使其与国家/地区名称相呼应)非常简单-参见此处:WP Codex的简码APIPut it in a template file - make a custom template for that page based on your default page template and add the PHP into the template file rather than the post content: Custom Page Templates
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)