How to test if a specific page is the front page?
You could try to replace: if (is_front_page()) { $menuIdOfCurrentPage = 0; with a check for the page_on_front option: if( is_int( $postID ) && $postID > 0 && $postID === (int) get_option( ‘page_on_front’ ) ) { $menuIdOfCurrentPage = 0; Here we added a check to see if $postID is a positive integer, because the page_on_front option … Read more