
This week, I wanted to give you some super simple and quick tips for working within your WordPress website.
Let’s say you want to do some work on your website, but you want to keep your readers off the site while you do the work. Open your functions.php file and add this bit of code:
function wpr_maintenance_mode() {
if ( !current_user_can( 'edit_themes' ) || !is_user_logged_in() ) {
wp_die('oops. you caught us doing some housecleaning. be right back - promise.');
}
}
add_action('get_header', 'wpr_maintenance_mode');
When you’re done, and ready to let your site shine again, simply remove that bit of code, and you’re back in the saddle again. You’ll only see the maintenance comment if you’re not logged into your website – here’s how it’ll look for your readers:

Want it to say something different? Just change out the words without whatever you’d like. Presto.
+++
Are you worried about those links that appear when people comment? If anyone types in a URL when they comment, WordPress will create it into a clickable link. Most people don’t have a problem with it – but if you do, here’s how to get rid of it.
remove_filter('comment_text', 'make_clickable', 9);
+++
What WordPress problem would YOU like solved? What’s your favourite hack?
>>Source: http://www.wprecipes.com
image credit














