Quick Maintenance Mode Tip [WORDPRESS]

Written by in WordPress - Print This Post



Quick Maintenance ModeWhen you are doing some serious maintenance work on your WordPress blog, you should make sure your visitors and readers don’t see that. Because it will be a mess right? If you hate plugins like me, then I have a simple tip for Quick Maintenance Mode.

Paste the following code on your functions.php file and save it. After completing your work, don’t forget to remove the code, or else it will display the same maintenance message to your visitors.

Feel free to customize the sentence “Maintenance, please come back soon.” and don’t edit any other code unless you know what you are doing, if you ask me I won’t touch it.

function wpr_maintenance_mode() {
if ( !current_user_can( ‘edit_themes’ ) || !is_user_logged_in() ) {
wp_die(‘Maintenance, please come back soon.’);
}
}
add_action(‘get_header’, ‘wpr_maintenance_mode’);

Thanks Skyje for this code.









HBB RSS
Hello there! If you are new here, you might want to subscribe to the RSS feed for updates on this topic. You will also get instant access to 100+ HBB Guides & Tutorials.
If you wish to subscribe here via Email, then kindly click here.



Editor-in-Chief and Owner of 20 Years Old Kiddo, Open Source Enthusiast, Tech Blogger, Striving Entrepreneur, and a Typical Engineering Student. Addicted to Blogging, Walking and Messing. Catch him on Facebook, Twitter and .


HBB has 666+ Awesome Contributors. [Join HBB].

HellBound Bloggers (HBB) is a part of Slashsquare Network.






13 Responses to “Quick Maintenance Mode Tip [WORDPRESS]”

Leave a Reply


Comments Policy | Brand Your Comments | Do Follow Blog | Top Commentators Award


REFERENCE : 7 Tips To Be A Hero On Blog Commenting [HELPFUL]


Overall HellBound Bloggers (HBB) has 23,573 Genuine Comments and Yours Will Add More Value To It.




Previous Article:

Next Article:

  1. Shawn says:

    Why do u hate plugins man? they are like lifelines for WP and the main thing that makes the use of WP infinite….

  2. Himanshu says:

    It cool . will keep this post handy. thanks for sharing

  3. Wow, Really a very useful tool. Even I hate those Plugins. I think of doing something by myself. Searcg Google, end up in getting a Plug-In.. Really, frustating..

  4. I often tweak my WordPress themes or layout so this tip comes in very handy for me. Thanks for sharing.

  5. Swamykant says:

    Thanks for the tips dude :)

  6. Thanks for this post, and for the skyje link, it's really helpful :)

  7. Jasmine says:

    Good tip. When I can see this message in action on HBB? Haha…
    Oh, by the way, your blog has been awarded PR4 again. Congrats. :)

  8. Kavya Hari says:

    Thank you so much for your post on here :) informative post Pradeep :)

  9. Satish says:

    good one dude, i hope i would learn this coding like u :)

  10. PS says:

    Perfect solution for what i was looking for, THANX ;)



Subscribe without commenting




COPYRIGHT © 2012 SLASHSQUARE NETWORK. REPRODUCTION WITHOUT EXPLICIT PERMISSION IS PROHIBITED. ALL RIGHTS RESERVED.

Slashsquare
Mobile Version · About Us · Contact Us · Subscription · Advertise · Review · Write For Us · Archives · Privacy Policy · Disclaimer
Loading...
ViperBarUp
ViperBarDown