Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I am having a problem where my theme will return all posts, and not only posts in category "theme_propertycat". This works fine while logged in though. Wordpress 3.0.1.. can someone help :(
- if($_REQUEST['list']=='favourite')
- {
- $totalpost_count = 0;
- $post_ids = get_usermeta($current_user->data->ID,'user_favorite_property');
- if(!$post_ids)
- {
- $post_ids[0]='0';
- }
- $querypost = array(
- 'post__in' => $post_ids,
- );
- }else
- {
- $userID = $current_user->data->ID;
- //$all_pro_catids = get_property_all_cat_ids();
- $propertycat = get_cat_id_from_name(get_option('theme_propertycat'));
- $all_pro_catids = get_sub_categories($propertycat,'string');
- $querypost['author'] = $userID;
- $querypost['post_status'] = 'draft,publish';
- $querypost['cat'] = "$all_pro_catids";
- }
- $totalpost_count = 0;
- $limit = 1000;
- $querypost1=$querypost;
- $querypost1['showposts'] = $limit;
- query_posts($querypost1);
- if(have_posts())
- {
- while(have_posts())
- {
- the_post();
- $totalpost_count++;
- }
- }
- global $posts_per_page,$paged;
- $limit = $posts_per_page;
- $querypost['showposts'] = $limit;
- $querypost['paged'] = $paged;
- query_posts($querypost);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement