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();