public static function isRootPage()
    {
        if (is_admin()) {
            return false;
        }

        $isHome        = is_home();
        $isFrontPage   = is_front_page();
        $currentPageId = (int) get_current_web_page_id();

        // No static page is used; rather, the root page
        // is a listing of latest blog posts.  It will use
        // the `front-page.php` template file.
        if (FrontPageDisplays::isSetToYourLatestPosts()) {
            return $isHome && $isFrontPage && ($currentPageId === 0);
        }

        // Just the static Posts Page is configured.  The latest
        // blog posts will be displayed using the `home.php`
        // template file.
        if (FrontPageDisplays::isSetToStaticPostsPage()) {
            return $isHome && !$isFrontPage && ($currentPageId === 0);
        }

        // A static front page is configured. It will use the
        // `front-page.php` template file.
        return !$isHome && $isFrontPage && ($currentPageId === (int) get_option('page_on_front', 0));
    }