WP 2.6 get_posts
-
Resolved
I have 2.6 WP version. Trying to get posts from one category. Using code
$args = array( 'post_type' => 'post', 'category' => $cat->cat_ID, 'offset' => 1, 'numberposts' => 2, 'post_status' => 'publish', 'orderby' => 'date', 'order' => 'DESC', 'meta_key' => 'video', 'meta_value' => 1); $posts = get_posts($args); foreach($posts as $post) { setup_postdata($post); ...
And getting all posts from $cat->cat_ID and child cats. Any ideas how to fix?
query_posts is useless, since it havent support of meta_key&meta_value
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘WP 2.6 get_posts’ is closed to new replies.