Title: Page ID?
Last modified: August 20, 2016

---

# Page ID?

 *  [adamkb.balan](https://wordpress.org/support/users/adamkbbalan/)
 * (@adamkbbalan)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/page-id-4/)
 * I am looking to do a if page id = bla else do something, How ever I am not sure
   what comes after if, what is the correct method call to say if the page id is
   1,2,3,4 do this, else do that.
 * this would be for the header – which is included on all pages.

Viewing 1 replies (of 1 total)

 *  [Jarret](https://wordpress.org/support/users/jarretc/)
 * (@jarretc)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/page-id-4/#post-2094060)
 *     ```
       <?php
       if ( is_page(4) ) {
        - Do this if it is page 4
       } else {
        - Do this for all other pages
       };
       ?>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Page ID?’ is closed to new replies.

## Tags

 * [id](https://wordpress.org/support/topic-tag/id/)
 * [if statement](https://wordpress.org/support/topic-tag/if-statement/)
 * [page](https://wordpress.org/support/topic-tag/page/)
 * [Page ID](https://wordpress.org/support/topic-tag/page-id/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Jarret](https://wordpress.org/support/users/jarretc/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/page-id-4/#post-2094060)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
