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.
Related Posts:
- Are post ID’s reliable?
- Get current post id in functions.php
- get all posts ID from a category
- Get the current post ID as a variable in Javascript
- Is post ID number always incremental n+
- Display all search results
- Add “Post Options” for new wordpress post
- Are all ID’s used unique?
- $post->ID displays wrong ID
- At my posts archive page, outside the loop, get_the_id() returns the top most post’s ID
- Add a custom option to a page in backend
- Showing random content / pictures from earlier posts in a sticky post?
- Get the post_id of a new post
- get post id in while loops outputting page id
- How can I display a specific user’s first published post?
- Undefined variable post_id in custom quick edit coloumn
- Getting post id from wp_insert_post_data function?
- Does an article (post) id ever change?
- How to activate Markdown in a local installation of WordPress 4.3?
- How to get the post’s parent ID?
- Can a page_id and a post_id be same?
- Is there a better, more efficient way to get the post id outside the loop?
- Getting current post ID in functions.php
- Buddypress activity id
- How to find what index page a post is on?
- Define a wordpress constant through plugin functions?
- How blog page in WordPress works : blog page retrieve first post ID
- Post-ID in url differs from $post->ID
- How to change the setting so there is no post on home page
- Why is my Blog Page ID == First Post ID?
- How do I get blog posts to appear within CMS?
- current post with current author
- Is it possible to change post id for an already added menu item in WordPress?
- Display post option on frontend
- Get ALL post ID’s export list (Only id’s. Php or sql not important )
- How to get next post ID?
- Search results posts_orderby and ID
- Set Default Category to Username
- Retrieve post ID from “querying” URL
- How to get a post’s content? [closed]
- obtain the author id given the post id
- How to get ID of the page included with get_page()?
- How to I retrieve the ID from the Posts page?
- Crazy Question – Updating Post ID
- Why I can not I use the variable outside my function?
- retrieve the oldest post id
- WP_Query custom field pass the post id
- Accessing Post ID Within Loop
- How do post IDs work in WordPress?
- Are post, page and category IDs unique to each other?
- The loop starting at a certain ID
- linking to post outside the loop
- Update field in database for users
- Dark Bar at the top of wordpress page can’t be seen?
- Widget to show posts in the sidebar basing on its IDs
- Get a post’s ID
- Making posts permalinks consistent numbers
- How to get post id of last approved comment?
- How to get the post id (of the parent custom custom type) in a loop inside a widget?
- Post page overwrite the custom blog page
- Get post slug and match with menu item slug to change css
- WordPress Post ids big increment
- blog post not accesible on click [closed]
- Reuse old post ID for new post after deleting post
- Get post attachment with post id
- Category URL to use same string as Post URL Permalink
- How can i take all ids from untrash_post action?
- Post being duplicated with foreach loop
- Showing get_option( ‘page_for_posts’ ) or View all posts link is not working in wordpress
- How do I apply a wordpress function to something with no ID inside an archive page?
- Get from the dashboard the ID of the current post being edited
- Only get post_id [duplicate]
- Surrogate ID for posts, is there an alternative field in the posts table?
- Is it possible to have dynamic post id # in add_menu_page()?
- Using Post ID and Page ID in same function
- unused post IDs
- Custom post page has attributes of latest post [closed]
- Can I get custom post items in select box (dropdown)
- What is $post->ID
- View post with specific category id and name which I selected in the backend (drop-down option)
- How to get post ID after removing that post?
- Count posts within a custom post type and specific taxonomy and terms?
- get_permalink returns default link
- How to disable Uncategorized category URL?
- Update post date on every new comment?
- Get post ID outside of the loop
- Custom post type single (permalink) throws a 404 error
- Authors in menu, template list post by author
- wordpress post images in accordion not showing up in some of the pc
- Block Editor: Reset Reusable Blocks to last saved record
- Post images are not displayed in media library
- Retrieve latest post by multiple categories with ID
- How to make the Post Author name fixed as “Editorial Staff” even if there are multiple authors?
- Trying to create parent for post. I need some help. Thanks
- The WordPress wp_posts data table
- How to automatically convert a form with HTML link into post
- how to change background color of my all post
- WordPress Post Updating is Not Working
- How to use shortcode to get the second to newest post?
- WordPress + Polylang – Error 404 when trying to preview draft post on different language