Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //get all id's ignoring global wp_query posts_per_page
- function eg_get_all_ids_in_query() {
- global $query_string;
- $query = query_posts( $query_string . '&posts_per_page=-1' );
- $temp = array();
- while ( have_posts() ) : the_post();
- $temp[] = get_the_ID() ;
- endwhile;
- return $temp;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement