This topic has 8 replies, 3 voices, and was last updated 9 years by Weird Mike.
-
Author
Tagged: Maintenance
-
July 19, 2015 at 05:59 #68902Weird MikeParticipant
How to I go about setting a my Maintenance page to be a custom page?
I’ve checked this site, and the documentation and found nothing. Please help.
July 19, 2015 at 14:45 #68936sharmstrModeratorYou can override the function that builds the page. Put this in your child theme functions.php file and edit as neccesary.
COPY CODEfunction 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) { /* Theme My Login compatibility */ if ( class_exists( 'Theme_My_Login' ) && Theme_My_Login::is_tml_page( 'login' ) ) { return; } if ( !current_user_can( 'edit_themes' ) || !is_user_logged_in() ) { wp_die( $logo_img . '<div style="text-align:center">' . sq_option('maintenance_msg', '') . '</div>', get_bloginfo( 'name' ) ); } } }
If that’s beyond your capabilities, then I suggest using a plugin. I use this one https://wordpress.org/plugins/coming-soon/
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
July 20, 2015 at 06:46 #69039Weird MikeParticipantThat did not work. You guys have a demo page in which it shows a page with the use of an actual page and not a styled maintenance section. Also, why is there a reference to a Theme My Login when it’s not the login I’m trying to change?
I need this.
July 20, 2015 at 13:12 #69064sharmstrModeratorWhat demo page?
The function is adding compatibility as it states. If you look further on in the function, it says “If the user isnt admin and they are not logged in, then die and show the logo and message.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
July 20, 2015 at 23:18 #69161Weird MikeParticipantDoesn’t work. I tried it on a different browser that in no way could I be logged in as admin.
You could just admit that it’s not possible to use a page as the Maintenance page.
This demo page.
http://seventhqueen.com/themes/kleo/get-connected-vertical-form/July 20, 2015 at 23:31 #69163sharmstrModeratorI think I was clear that there is no maintenance “page” and that’s its built using a single function which I provided.
There’s nothing stopping you from using VC shortcodes copied from whatever page you want in the function.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
July 20, 2015 at 23:43 #69168sharmstrModeratorAbout 1.5 years ago I used a plugin that allow me to redirect everyone except admins to a page. For the life of me I cant remember the name of it. If I come across it I’ll let you know.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
July 21, 2015 at 12:05 #69241AbeKeymasterHello, you can try with this code and modify the redirect link
COPY CODEadd_action( 'template_redirect', 'kleo_redirect_to_specific_page' ); function kleo_redirect_to_specific_page() { if ( ! is_user_logged_in() && ! is_admin() ) { wp_redirect( 'http://www.example.com/your-page/', 301 ); exit; } }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.July 23, 2015 at 02:20 #69540Weird MikeParticipantThank you everyone for your help and even though nothing has worked so far, I’m just going to stick with the default maintenance settings for the time being and just hope that in the future having more maintenance options in the admin panel will come true.
This is by far one of my most prized themes I’ve ever used (more so than X).
-
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.