0
你好我想创建一个文件,它将生成一个自定义的XML与我的产品, 我没有任何问题创建XML, 但我想连接到数据库并执行查询使用WP内置的功能。创建一个包含所有功能的wordpress文件
我该怎么做?例如我将这个文件buildXml.php 添加到项目文件夹。
<?php
//buildXml.php
require(WORDPRESS_FUNCTIONALITY);
// The Query
query_posts($args);
// The Loop
while (have_posts()) : the_post();
echo 'stuff';
endwhile;
// Reset Query
wp_reset_query();