admin管理员组文章数量:1323723
$orders = get_posts(array(
'post_type' => 'lp_order',
));
foreach ($orders as $order) {
// get all order data code
}
This the code I will try to learnpress plugin order post type front end display but it's not working I also check his capability.
please suggest me I am a beginner in WordPress so no more ideas.
I try a different method like this:
$args = array(
'post_type' => 'lp_order',
)
$tech_posts = new WP_Query($args);
if ($tech_posts->have_posts()) :
while ($tech_posts->have_posts()) : $tech_posts->the_post();
//order code
endwhile;
endif;
本文标签: pluginscustom post type getposts() function not work
版权声明:本文标题:plugins - custom post type get_posts() function not work 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742123695a2421840.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论