I'm using the following code to ask for a custom post type. Despite being set to "Post_status = publish", it is still showing the blank "Auto Draft" page on the front, although I can not find them on the backend. How can I get rid of these posts?
& lt; Php global $ themeple_config; $ Query = New WP_Query (array ('post_type' = & gt; 'testimonial', 'post_status' = & gt; 'publish', 'orderbie' = & gt; 'post_date', 'order' => DESC '));
It was just a typo "published" should be clearly "published" Was there.
The correct code is as follows:
$ query = new WP_Query (array ('post_type' = & gt; 'testimonial', 'post_status' = & gt; ; 'Publish', 'Orderbie' = & gt; 'PostDate', 'Order' => 'DESC')); Credit to @Yuyokk to notify
.
No comments:
Post a Comment