Title: is page array for page range
Last modified: August 21, 2016

---

# is page array for page range

 *  Resolved [carinsurancecomparison](https://wordpress.org/support/users/carinsurancecomparison/)
 * (@carinsurancecomparison)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/is-page-array-for-page-range/)
 * Hi, at the moment I am using:
 * `if (is_page( array ( 6837,6830,6819,6852,6855,6858,6886,6909,7072,6936,6955 ))){`
 * but the number of pages is getting crazy, is there a way to do for example…
 * `if (is_page( array ( 6837-7000 ))) {`
 * thanks in advance

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/is-page-array-for-page-range/#post-4160566)
 * Try it with:
 *     ```
       if ( is_page( range( 6837-7000 ) ) ) {
   
       }
       ```
   
 * [http://www.php.net/manual/en/function.range.php](http://www.php.net/manual/en/function.range.php)
 * A better way would be:
 *     ```
       // global $post;
       if ( $post->ID > 6837 && $post->ID < 7000 ) {
   
       }
       ```
   
 *  Thread Starter [carinsurancecomparison](https://wordpress.org/support/users/carinsurancecomparison/)
 * (@carinsurancecomparison)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/is-page-array-for-page-range/#post-4160569)
 * thanks, the first one didnt work at all (it just showed it on all pages) but 
   the second one worked a treat!
 * Cheers
 * Andy

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘is page array for page range’ is closed to new replies.

## Tags

 * [array](https://wordpress.org/support/topic-tag/array/)
 * [code](https://wordpress.org/support/topic-tag/code/)
 * [conditional](https://wordpress.org/support/topic-tag/conditional/)
 * [page](https://wordpress.org/support/topic-tag/page/)
 * [range](https://wordpress.org/support/topic-tag/range/)
 * [tags](https://wordpress.org/support/topic-tag/tags/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [carinsurancecomparison](https://wordpress.org/support/users/carinsurancecomparison/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/is-page-array-for-page-range/#post-4160569)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
