Title: Get current post/page ID
Last modified: September 1, 2016

---

# Get current post/page ID

 *  Resolved [hands_solo](https://wordpress.org/support/users/hands_solo/)
 * (@hands_solo)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/get-current-postpage-id/)
 * Hi All,
 * I’m trying to retrieve the ID of the current page/post in my angularjs theme 
   but cannot figure out how to do it.
 * I’ve tried searching the docs but there doesn’t appear to be an out of the box
   way to do it.
 * Is there a simple way of achieving this?
 * [https://wordpress.org/plugins/rest-api/](https://wordpress.org/plugins/rest-api/)

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

 *  Thread Starter [hands_solo](https://wordpress.org/support/users/hands_solo/)
 * (@hands_solo)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/get-current-postpage-id/#post-7702019)
 * Sorry I meant get the ID of the front page if it’s the current page without hardcoding
   the ID or slug in the endpoint.
 * I want to get the info dynamically.
 *  Thread Starter [hands_solo](https://wordpress.org/support/users/hands_solo/)
 * (@hands_solo)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/get-current-postpage-id/#post-7702056)
 * In the end I used this plugin:
 * [wp-rest-api-options](https://github.com/Oleg2tor/wp-rest-api-options)
 * And retrieved the ID from the `page_on_front` option

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

The topic ‘Get current post/page ID’ is closed to new replies.

 * ![](https://ps.w.org/rest-api/assets/icon-256x256.png?rev=1346297)
 * [WordPress REST API (Version 2)](https://wordpress.org/plugins/rest-api/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/rest-api/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/rest-api/)
 * [Active Topics](https://wordpress.org/support/plugin/rest-api/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/rest-api/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/rest-api/reviews/)

## Tags

 * [angularjs](https://wordpress.org/support/topic-tag/angularjs/)
 * [endpoint](https://wordpress.org/support/topic-tag/endpoint/)

 * 2 replies
 * 1 participant
 * Last reply from: [hands_solo](https://wordpress.org/support/users/hands_solo/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/get-current-postpage-id/#post-7702056)
 * Status: resolved