在不同位置创建文件 [英] create file in a different location
本文介绍了在不同位置创建文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用 wordpress 在常见 wordpress 帖子和页面的不同位置创建一个页面,如下所示:http://example.com/sitemap.xml但我想使用 WP Loop 和所有的 wordpress 功能请帮帮我
I want to with wordpress create a page in a different location of common wordpress posts and pages, like this: http://example.com/sitemap.xml and yet I want use WP Loop and all of wordpress functions please help me
推荐答案
您应该使用
header('Content-Type: text/html; charset: UTF-8');
require( '../../../../wp-load.php' );
其中 ../../... 是您的 wp-load.php
文件的路径,具体取决于您放置的位置.
where ../../ ... is the path to your wp-load.php
file depending on where you put it.
此后,您可以按照自己喜欢的方式使用循环.
After this, you can use loop the way you like.
这篇关于在不同位置创建文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文