Hide wordpress login page error feedback

September 25, 2009

Is your blog secure? Normally when you try to login and mess something up, WordPress dishes out a helpful sentence or two either explaining that your username or your password is incorrect. While this is helpful for you and your site’s members, it’s also helpful for anyone trying to do bad things to your site. Here is a quick tip that you can easily implement to prevent displaying useful message to potential wordpress hackers. To remove theses error messages, simply open your functions.php file and paste the... [Read the full story]

Tell WordPress to Use the Default Theme

September 24, 2009

The $theme variable of wordpress control the apparence of your wordpress, its value is the name of your wordpress theme. We’ll show you how you can switch themes using a simple code snippet. Just paste the following code in the functions.php file. When this code will be executed, the “default” theme will replace your current theme. add_filter('option_template', 'themechoose'); add_filter('template', 'themechoose'); add_filter('option_template', 'themechoose'); add_filter('option_stylesheet', 'themechoose'); function... [Read the full story]

Display the loop using wordpress shortcode

September 23, 2009

The loop is the easiest way to display WordPress posts, perfect for those sites who are using WordPress as a CMS. But we can create a shortcode that will make post displaying simpler. Use this shortcode below to create a loop on a page, post or sidebar. Just use template tags and html like you would in a normal loop to create your layout. The sample below displays an unordered list with titles and links to the post. Just paste code in your functions.php file. Or if you want, you can use it in a plugin. // The Loop /* *... [Read the full story]

Using Cron to schedule events in WordPress

August 12, 2009

WordPress can schedule events. but how you create an event that will be executed once hourly, or daily, etc? Just copy following code to your functions.php file: if (!wp_next_scheduled('live_task_hook')) { wp_schedule_event( time(), 'hourly', 'live_task_hook' ); } add_action( 'live_task_hook', 'live_task_function' ); function live_task_function() { wp_mail('you@yoursite.com', 'Automatic email', 'Hello, this is an automatically scheduled email from Live Experience.'); } On line 1, we created an event, after verifying... [Read the full story]

Disable wordpress posts auto saving

August 12, 2009

WordPress have a very useful function that autosaves your posts while you’re typing them in the dashboard. Though, if for some reason you’d like to disable this function, it is very easy to do. To disable WordPress autosaving function, simply open your functions.php file and paste the following code: function disableAutoSave(){ wp_deregister_script('autosave'); } add_action( 'wp_print_scripts', 'disableAutoSave' ); Once you saved the file, WordPress will never autosave a post. To enable autosaving again,... [Read the full story]