I set static page as front page.
I need to know if user currently on homepage in my custom plugin.
Functions is_home() and is_front_page() doesn't works, since homepage is static page.
I can get an id of this page :
$frontpage_id = get_option('page_on_front');
But how to get id of current page from admin plugin? (Then i'll be able to compare those ids and detect if current page is homepage!)
2 vancoder Code:
1) Set any static page as frontpage.
2) Create dummy plugin
3) Code of plugin :
$d = is_front_page(); var_dump($d); ==> bool(false)
should work, by didn't
Admin plugin means just plugin :) sorry
And those two lines is all context for now, try it yourself, it doesn't works.
WP version 3.3.2