At my posts archive page, outside the loop, get_the_id() returns the top most post’s ID

Figured it out. use is_home() to detect if its the posts archive page. kind of counter-intuitive because i always thought that function was to determine if it’s the homepage, found out there’s a is_front_page() for that.

Leave a Comment