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.
Related Posts:
- How do I apply a wordpress function to something with no ID inside an archive page?
- Get page ID of page that is set as the posts page
- Difference between an archive and a page listing posts
- Are post ID’s reliable?
- get all posts ID from a category
- Clear cache when a post is submitted [closed]
- Get the current post ID as a variable in Javascript
- Is post ID number always incremental n+
- Create an “All Posts” or “Archives” Page with WordPress 3.0?
- widget should display post archive by year and on click also by month
- $post->ID displays wrong ID
- Single.php Active Category Class
- Link for the page archive for posts, like using custom post types with get_post_type_archive_link
- Showing random content / pictures from earlier posts in a sticky post?
- Get the post_id of a new post
- get_post_type_archive_link(‘post’) returns current category archive
- How can I display a specific user’s first published post?
- Undefined variable post_id in custom quick edit coloumn
- change default post archive page link
- Getting post id from wp_insert_post_data function?
- Does an article (post) id ever change?
- Display all months with posts and inside each month show the 5 latest posts
- Can a page_id and a post_id be same?
- Buddypress activity id
- Category List (Archive) Page Template By Category
- Yearly archive page for future year
- How blog page in WordPress works : blog page retrieve first post ID
- Which URL to enter into browser to show all posts in archive.php?
- Guest Author – How to display posts on /author/ archive page
- Post-ID in url differs from $post->ID
- Why is my Blog Page ID == First Post ID?
- current post with current author
- Is it possible to change post id for an already added menu item in WordPress?
- Get ALL post ID’s export list (Only id’s. Php or sql not important )
- How to get next post ID?
- List category posts alphabetically on archive.php
- Search results posts_orderby and ID
- How to display excerpt post on hamepage and archive pages?
- Retrieve post ID from “querying” URL
- Increase 10 post limit per page
- Automatically create a new page daily with last three posts
- 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()?
- Why I can not I use the variable outside my function?
- Custom Post Type archive
- retrieve the oldest post id
- Does WP automatically tag posts into the archive?
- singular posts using archive styling
- 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?
- Post-Archive like a page in a specific subdirectory
- The loop starting at a certain ID
- linking to post outside the loop
- Display in category ( taxonomy) a number of post that I want
- Widget to show posts in the sidebar basing on its IDs
- Find out in which kind of archive am I
- Making posts permalinks consistent numbers
- adding my posts (author posts) in menu
- How to view all posts (on site, not admin) that are uncategorized?
- How to get post id of last approved comment?
- Highlighting Current Category in the Archive and Feeds page
- How to get the post id (of the parent custom custom type) in a loop inside a widget?
- How to hide protected posts from archive?
- blog post not accesible on click [closed]
- Reuse old post ID for new post after deleting post
- Redirect to custom post if custom archive page has just one result?
- Posts are not displaying on their category and tag page
- Get post attachment with post id
- show image gallery in archives or category page
- view a list of 3 future post, from the nearest to the most far
- Get posts from category from custom query
- How can i take all ids from untrash_post action?
- Get from the dashboard the ID of the current post being edited
- Page 2 has no posts?
- Surrogate ID for posts, is there an alternative field in the posts table?
- Disable archiving of old posts?
- Is it possible to have dynamic post id # in add_menu_page()?
- How to display term in archive page?
- Using Post ID and Page ID in same function
- How to organise post by category and date
- Daily posts like an archive
- How to get alphabetic listing x other posts, based on first letter post?
- unused post IDs
- How do I display the next 3 posts in the sidebar?
- How to get pagination working with “Pending” Posts
- Show all posts in category
- custom sort posts in archive/taxanomy page
- Custom post page has attributes of latest post [closed]
- Can I get custom post items in select box (dropdown)
- Add author section on Author archive posts
- What is $post->ID
- View post with specific category id and name which I selected in the backend (drop-down option)
- Display post count on archive page in reverse order
- Filter/Sort Post Form On Taxonomy page
- How to get post ID after removing that post?
- Category and archive issue
- Why does ‘get_the_ID’ work outside of the loop?