Disable the update message in wordpress dashboard

February 23, 2009

When a new version of WordPress is available, a message asking you to update your WP installation is displayed on your dashboard. But sometimes you may want to hide this message. To get rid of the “Please update now” message in your WordPress dashboard, simply paste the following code on your functions.php file.   if ( !current_user_can( 'edit_users' ) ) { add_action( 'init', create_function( '$x', "remove_action( 'init', 'wp_version_check' );" ), 2 ); add_filter( 'pre_option_update_core', create_function( '$x',... [Read the full story]

Disabling the update nag of wordpress

November 30, 2008

WordPress’ core update nag is quite the useful thing, I’ll usually know before it shows that there’s an update, but a lot of people won’t. If you don’t know what I mean with core update nag, it’s this thing: WordPress x.x.x is available! Please update now.  The issue is that this thing doesn’t only show to you, it shows to all users of your blog. A better thing to do is add this code to your themes functions.php: if ( !current_user_can( 'edit_users' ) ) { add_action( 'init',... [Read the full story]

Display recently updated wordpress posts and pages

November 11, 2008

Ever wanted to be able to display posts and page that have been updated recently?   Paste this code anywhere you’d like to display a list of recently updated posts and pages.   You can specify how much item to show by editing the value of the $howMany variable.   <?php $today = current_time('mysql', 1); $howMany = 5; //Number of posts you want to display if ( $recentposts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'publish' AND post_modified_gmt < '$today'... [Read the full story]