0

Is this a bug in WordPress?

When I am the blog index page:

http://mysite/blog/

var_dump(is_home()); // bool(true) --> correct

But when I am still on the blog index page with pagination:

http://mysite/blog/page/3

var_dump(is_home()); // bool(false) --> incorrect!!

It should be true because I am still on the blog page!

Any ideas how I can get around to this?

andreas
  • 16,357
  • 12
  • 72
  • 76
Run
  • 54,938
  • 169
  • 450
  • 748
  • I'm running WP 4.6 and tried to recreate this issue with no luck, so I don't think it is a bug in WP. Have you tried deactivating all plugins? – lassemt Aug 27 '16 at 10:25
  • @lassemt im on WP 4.6 as well. I don't think it is to do with the plugins. I don't have other plugins installed. – Run Aug 28 '16 at 03:23
  • 1
    @teelou Ok, I'm just asking because this looks like a very uncommon wp error. Are there posts on the "paged" pages? For example if wordpress loads a "paged" page without any posts it will load the 404 instead of home. Also have you tried putting in the conditional tag **is_paged()** just to see if wp see if it is paged? You should also check the classes added to the body in inspector, this can show you what template is actually being loaded. – lassemt Aug 28 '16 at 07:56

0 Answers0