Title: Front page ID
Last modified: August 19, 2016

---

# Front page ID

 *  [azzimuth](https://wordpress.org/support/users/azzimuth/)
 * (@azzimuth)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/front-page-id/)
 * Does WP provide any function which outputs the ID of the page set as front page
   in options? I need that to resolve the problem with double links to the front
   page when using static front page and themes (one way to fix this is described
   [here](http://mcbuzz.wordpress.com/2009/02/25/wordpress-tutorial-how-to-make-a-static-page-your-home-page-hide-a-double-home-page-link)).
   But I had an idea to use `get_list_pages()` with ‘exclude’ argument set to the
   ID of the front page but could not find any function which outputs the ID of 
   the page set as front page in options. One can of course set the argument manually
   but the code should be edited every time the front page changed.

Viewing 1 replies (of 1 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/front-page-id/#post-1422647)
 *     ```
       <?php
       echo get_option('page_on_front');
       echo get_option('page_for_posts');
       ?>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Front page ID’ is closed to new replies.

## Tags

 * [front page](https://wordpress.org/support/topic-tag/front-page/)
 * [function](https://wordpress.org/support/topic-tag/function/)
 * [id](https://wordpress.org/support/topic-tag/id/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [MichaelH](https://wordpress.org/support/users/michaelh/)
 * Last activity: [16 years, 2 months ago](https://wordpress.org/support/topic/front-page-id/#post-1422647)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
