Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1358666

    Hi,
    I found people asking to exclude page ids from the maintenance mode but nothing happened since a couple of years. We now have the same issue because privacy policy and imprint have to be accessible if the maintenance mode is on.

    I’ve added a filter to class-avia-custom-pages.php:315 (into the handler_maintenance_mode function):

    $exclude_maintenance_ids = apply_filters('avf_exclude_maintenance_ids', []);
     if ( is_array($exclude_maintenance_ids) && !empty($exclude_maintenance_ids) ) {
         foreach ($exclude_maintenance_ids as $exclude_maintenance_id) {
              if ( get_the_ID() === $exclude_maintenance_id ) {
                   return $template;
              }
         }
    }

    It would be possible to add page id’s via the filter:

    add_filter('avf_exclude_maintenance_ids', function($ids) {
       return [39];
    });

    Could you pass this to your developers for review?

    Best,
    Patrick

    #1358726

    Hi Patrick,

    Thanks for posting your suggestion.
    Will forward your request to our devs :)

    Best regards,
    Nikko

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Exclude pages from maintenance’ is closed to new replies.