Chris micek

web/interface designer, front-end developer, and wordpress developer

WordPress: Get the the page ID of the Posts Page

August 9th, 2009

This took me over an hour of searching. I specified a static front page and then needed to write some custom functions to specifically target the separate post page; however it seemed almost impossible to get that page id, in or out of the loop.

Additionally, this was for a custom theme so I couldn’t use get_page_by_title() because I wouldn’t know what the title of the page was going to be.

Instead I dug around and found this WordPress option that isn’t even documented in the Option Reference Table.

get_option(‘page_for_posts’)



posts-page-id