New posts dont display
-
After installing plugin I have the problem that posts are not displaying using get_posts() function as below:
$args = array( 'posts_per_page' => -1, 'post_type' => 'post', 'offset' => 0, 'category' => $category->term_id, 'post_status' => 'publish', 'meta_key' => '_sort_'.$category->term_id, 'meta_type' => 'NUMERIC', 'orderby' => 'meta_value', 'order' =>'ASC' ); $posts = get_posts($args);
I think is that because new posts doesnt have order value. After going to taxonomy order page new posts have order value set to “0” – the same as one of the the other post. After saving the order everything works perfectly.
I think solution will be hook which shifts menu order value in given taxonomy, but I dont know how to achieve that.
- The topic ‘New posts dont display’ is closed to new replies.