The $post object contains data for the main query of the current page. So in your case the main query on your front-page.php contains the data from the page you assign to be your front-page. Your blog page however is an archive and can contain multiple post data. And in both cases you use the loop to access this data.
Maybe this page will help explain some more:
https://developer.wordpress.org/themes/basics/the-loop/
Edit:
Okay so I think what you need is get_queried_object()
this will return the Page ID when on the front-page or blog. The $post
object contains data for the first post in the Loop, you should think of the Blog page as an Archive instead of a Page.
Related Posts:
- Showing random content / pictures from earlier posts in a sticky post?
- How to get the post’s parent ID?
- Why is my Blog Page ID == First Post ID?
- Are post ID’s reliable?
- Get current post id in functions.php
- Disable WordPress’ blogging functionality and disable ‘posts’
- Is post ID number always incremental n+
- How do I convert a mathematical Microsoft Word document to a WordPress blog post?
- how to display full post with pagination on home page
- Are all ID’s used unique?
- blog page showing only first 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
- How to show a full post, not just an excerpt
- Getting post id from wp_insert_post_data function?
- Does an article (post) id ever change?
- 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
- Blog Posts not showing title
- Remove certain post-formats from showing in blog?
- Blog Posts in Custom Menu
- Post-ID in url differs from $post->ID
- Add blogs to “Blogs i Follow” sidebar [closed]
- current post with current author
- Display posts from a different website on Genesis Responsive Slider
- add new post default view
- Show certain posts in a LIST format that members have been granted access to
- How to get next post ID?
- How to disable WordPress blog folder
- How could I change my Permalink from blog to custom structure? [closed]
- How to remove in-line style of WordPress’s post content only?
- How to get a post’s content? [closed]
- 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
- WP move posts to different path
- Why I can not I use the variable outside my function?
- Append ‘Continue Reading’ link if post length is more than 3 lines of text?
- older blog posts not showing in new theme
- retrieve the oldest post id
- Why won’t pagination work?
- WordPress Query Posts From Category Post on Static Page
- How to create a page that shows the last 10 posts?
- Exclude post category in a blog page
- How to set a certain Custom Template to a Single Blog Post
- Accessing Post ID Within Loop
- Are post, page and category IDs unique to each other?
- The loop starting at a certain ID
- linking to post outside the loop
- Sidebar on single.php not showing up
- Get a post’s ID
- 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?
- posts and cms and posts again
- Changing The Default Header POST Title and Description text by category in wordpress
- Separate blog and reviews categories
- why my urdu text is not aligned properly when written in wordpress blog post?
- Older blog posts not showing up on WordPress
- Pagination not give another posts
- “Blog pages show at most” in setting not working
- Sticky Post Doesn’t always work
- Post Image Gallery After Content Function messes with other content
- Single Post Gallery Using Shortcode
- Get post slug and match with menu item slug to change css
- WordPress Post ids big increment
- How can I create a ‘sub-blog’ which has its own sidebar on individual posts?
- blog post not accesible on click [closed]
- How to fix wordpress blog post error? Can anyone help to fix this issue?
- How to pull sticky post permalink inside php?
- WordPress empty page! what is wrong with this code?
- Pagination Stops
- Bulk find & replace on WordPress posts/pages (minus image paths)
- Customizing a new page used for blog posts with Avada theme
- Blog images not showing on homepage
- How to generate an HTML link automatically from URL in a users’ post
- Multiple Pages – Seperate blogs
- Word /blog/ in slug post, problems in CPT. Solutions?
- How do I apply a wordpress function to something with no ID inside an archive page?
- How to put the WordPress blog into theme
- Why the blog posts is not showing?
- 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()?
- Blog styling in SASS
- Hide first blog post in content and output it in widget
- How can I have the posts from one word press blog show on the presentation page of another word press site
- Page updates appear in Preview but not live version?
- Using Post ID and Page ID in same function
- new blog post does not appear in blog after publishing
- Posts don’t appear on the Blog page
- Wanting to apply different featured images for each post
- long blog post on self hosted wordpress blog not displayed
- WordPress Custom Theme: My site shows the same posts on Page 1 and Page 2 and so on [duplicate]
- Post only showing on homepage when Logged in – direct URL still working
- Can I get custom post items in select box (dropdown)
- The page that displays Posts on homepage
- How to add a widget area between blog posts in Genesis Framework?