Return Status code 403 forbidden for maintenance mode
-
Hello
In maintenance mode, now return status code 200 witch is so bad for SEO!
it must be 403 , and ask for login credential. (the login is not important, but 403 status is highly important)
Is it possible to solve that?
Thanks
Hello,
Sorry to hear about the inconvenience. Kindly, please share your Site WP-ADMIN Login details in the Private Content field so that we can check this concern on your Site and help you out accordingly.
Best Regards
Hello
Thanks for reply
It was just bug report, noting els
Just test on your side, put the site in maintenance mode, and see the status code
Thanks
Hello,
Sorry for the late reply.
The maintenance mode has always worked this way for us, but if it doesn’t suit your needs, we can provide you with custom code that you’ll need to add to the functions.php
file in your child theme.
add_action( 'template_redirect', function () {
if ( ! woodmart_is_maintenance_active() ) {
return;
}
global $post;
$page_id = current( woodmart_pages_ids_from_template( 'maintenance' ) );
if ($post->ID == $page_id) {
http_response_code( 403 );
}
}, 10 );
Best Regards.
Hello
that code is working
Thanks
Most Welcome!!!.
I’m so happy to hear you are pleased with the Theme and Support. XTEMOS strives to deliver the best customer experience, and it makes our day to hear we have accomplished that.
We count ourselves lucky to have you as a customer. You can always reach us at any time. We are always here to help you.
Thanks for contacting us.
Have a great day.
Topic Closed.
Best Regards.
The topic ‘Return Status code 403 forbidden for maintenance mode’ is closed to new replies.