Why does is_front_page and is_home always return true for posts in wordpress?

My front page is just a list of the posts separated by category. I’m working on a plugin that get the id of the post but needs to test if the user is currently on the front page:

if(is_front_page()){
     do this thing
}
else {
     do this other thing
}

problem is, on the post pages it returns true for is_front_page. I tried is_home but get the same result.

Related posts

Leave a Reply

1 comment