Get page ID of page that is set as the posts page

Use the page_for_posts option:

<?php
$page_for_posts = get_option( 'page_for_posts' );
?>

This will return the ID of the Page assigned to display the Blog Posts Index.

Leave a Comment

404 Not Found

Not Found

The requested URL was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.