-
Author
Tagged: maintenance mode, known users blocked
-
January 11, 2015 at 05:51 #41667mattylbParticipant
Howdy! I noticed an issue where maintenance mode could post a problem while testing. While working with my test site for integration of a wcvendors feature, I had a user with “vendor” role that was not able to view the front-end site, only their back-end area. Is there a way to allow known users to bypass the front-end block that maintenance mode provides?
THANKS
January 12, 2015 at 17:22 #41772RaduModeratorHello,
Paste this code in your kleo-child theme functions.php
COPY CODE/*************************************************** :: MAINTENANCE MODE ***************************************************/ if (!function_exists('kleo_maintenance_mode')) { function kleo_maintenance_mode() { $logo_path = apply_filters('kleo_logo', sq_option_url('logo')); $logo_img = '<img src="'. $logo_path .'" alt="maintenance" />'; if (sq_option('maintenance_mode', 0) == 1) { if ( !is_user_logged_in() ) { wp_die( $logo_img . '<div style="text-align:center">' . sq_option('maintenance_msg', '') . '</div>', get_bloginfo( 'name' ) ); } } } add_action('get_header', 'kleo_maintenance_mode'); }
Logged in users can bypass the maintenance mode.
Let me know if is ok.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.