I might not have the complete english vocabulary to describe each time the exact reasons why something is not right, but when I fall in the same issue over and over it is definitely not. I'm not saying it's wrong, so wp defenders stay cool, but there's something, call it "intituitiveness", "simplicity", "convenience" or anyway you want, that is making the detection of the home page no-as-smooth-as-it-could.
I'm talking about the is_home - is_front_page detection.
This is probably the 4th time that happens to me, and I always had to fix it by doing it in an ALTERNATE way. That means -for me. It's my opinion, not to debate- that in some or other way the inner working of those functions are separate of expectations. They must do EXACTLY what they were designed for, but who cares if the need is something different?
The following code in index.php returns false
if (is_home() || is_front_page() || is_page() || is_single() || is_archive())
- I'm not using more than one query, and DID tried the reset function. No success
- I de-activated all plugins, No success
- I'm using the code outside any if, loop or function
- I'm using the latest version of WP
- I tried using is_nav_menu_item($front_page_id_here), no success
- I tried is_page($front_page_id_here) before realizing even is_page() returns false
- I tried removing and re-adding widgets, no success
I'm using this static page with a custom template defined and the "blog" page works fine.
Seems it seems to be none of the above: Is there any test I can do to find out what my front page is?
[Comments regarding forum moderators removed]