Hello @beatnik,
There is no built-in option to exclude the homepage because what you need is a very particular case.
Anyway, you can try this snippet of code:
/**
* Disable maintenance mode on homepage
*
* @param boolean $is_excluded
* @return boolean
*/
function wpmm_disable_maintenance_on_homepage($is_excluded) {
if (is_home() || is_front_page()) {
$is_excluded = true;
}
return $is_excluded;
}
add_filter('wpmm_is_excluded', 'wpmm_disable_maintenance_on_homepage', 11, 1);
Place the snippet at the end of the functions.php file (located inside your active theme/child-theme directory). If there is a PHP closing tag ?>, make sure you add the code before it.
—
George
-
This reply was modified 6 years, 9 months ago by
George J.
It works fine, thank you π
i’ve come across the same issue multiple times and it’s actually not a very particular case: when developing a site for a client on a dev server you usually get to a point when you’d like to let them review the front page and not necessarily other pages.
in another plugin this is possible by excluding the front page with a shortcode, [home] if i remember correct. maybe this solution could be implemented here as well?
@getupworks This plugin is installed on 600k+ websites and, over the years, only a few people (<10) asked about this feature. That’s why I believe it is a very particular case.
But the idea with the shortcode could be useful. Thanks. π
-
This reply was modified 6 years, 7 months ago by
George J.