Identify Authors With Gravatars


Since WordPress version 2.5, it is easier to include the Gravatar of a comment author in the comments. WordPress offers a feature that is easy to use and it brings some parameters with. In order to use and how to include a Gravatar, I would refer to the article „Gravatar Use Easy“.

But with this feature you can do more. Magazine-style for blogs are currently in high demand and many blogs have a a couple of authors. Many times the blogs link and present the author of the respective contribution. WP offers a whole range of template tags to this functionality, check out Codex.

Now it would be nice to give the author a face. Continue reading …

Update Informations Only for Admins

If you only want to let users, who are privileged to receive information about updates and plugins, you should copy the following code to your functions.php of your theme. These users have to have the right "edit plugin" (edit_plugins) to receive updates.

Alternative: use the plugin Secure WordPress, the plugin has inside the function to active this possibility.

/**
 * remove core-Update-Information
 * @rights: http://codex.wordpress.org/Roles_and_Capabilities
 */
if ( !current_user_can( 'edit_plugins' ) ) {
	// core update
	add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ) );
	add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ) );
	// plugin update
	add_action( 'admin_menu', create_function( '$a', "remove_action( 'load-plugins.php', 'wp_update_plugins' );" ) );
	add_action( 'admin_init', create_function( '$a', "remove_action( 'admin_init', 'wp_update_plugins' );" ), 2 );
	add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_update_plugins' );" ), 2 );
	add_filter( 'pre_option_update_plugins', create_function( '$a', "return null;" ) );
}

Adding A Private Page Into The Navigation

WordPress Themes

If you use pages which have the state private, they will not be shown in the navigation. Nevertheless it can make sense to show this specific page in the navigation, if you want to provide easy access to this page for your users. The page should only appear to privileged users for sure. I will show you a little hack, which will let you exactly do this.

Continue reading …

Google News To Release With WordPress


Google News can be a coveted platform. But Google needs for the aggregation a special format - News Sitemap.

Basically you can create this format in two ways with WordPress. Both solutions will be presented here. I will talk about the second example more in detail, because I believe it shows very nicely how to use content from WordPress outside your blog.

  1. The first way is to create a sitemap, similar to a feed in WordPress. This has several advantages for the administration in WordPress.
    How to create a feed, I have in the tutorial „WordPress Feed for Drafts“ shown. You can download this solution as a plugin and simple use Google News-Sitemap.
  2. A second possibility is to create a PHP file in the root directory and to write the latest posts into the appropriate format.

Continue reading …