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
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You should call "wp functions" at the beginning of your file using
header('Content-Type: text/html; charset: UTF-8');
require( '../../../../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.