Make an author box in WordPress

March 31, 2010

In this tutorial you will learn how to add the author’s profile box at the end of the wordpress post. If you have a gust authors it is good to have author’s profile box. You can easily change background, border colors by editing CSS code. Please make sure to backup theme before changing anything. Please add below CSS code in your style.css file which is located in your theme directory. #authorbox{ background:#EFEFEF; border:1px solid #CECFD0; width:638px; margin:0 auto; margin-bottom:10px; overflow:hidden; } #authorbox... [Read the full story]

Display the latest author who modified a post

April 22, 2009

WordPress 2.8 will feature a new template tag, the_modified_author(), which allows you to display the latest author who modified the post. Here is how to recreate this function in WordPress 2.7. To create the function, just paste the code below in your functions.php file: if (!function_exists('get_the_modified_author')) { function get_the_modified_author() { global $post; if ( $last_id = get_post_meta($post->ID, '_edit_last', true) ) { $last_user = get_userdata($last_id); return apply_filters('the_modified_author',... [Read the full story]

Add author’s gravatar in wordpress posts

January 18, 2009

What about displaying the author picture in your posts? Sure, you can use a well known hack to display a picture located in your theme directory, but what about using Gravatar? In this article, we’ll show you how you can easily get the post author gravatar and display it. To achieve this recipe, simply paste the following code on your single.php file, where you want the gravatar to be displayed: <?php $author_email = get_the_author_email(); echo get_avatar($author_email, '96'); ?>  Read More →

How to list wordpress posts by author

November 4, 2008

You first need to know the ID of each author you want to list posts. On your WordPress dashboard, go to Users. When you put your mouse over an username, look for the adress appearing in your browser’s status bar. The user ID is displayed in the url. Once you have the ID(s), paste the following code where you want to list the post from a specific author: $numposts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_author = 1"); echo "Posts by Author 1"; <ul> foreach ($numposts as $numpost) { echo... [Read the full story]

Change wordpress author attribution on all posts at once

October 29, 2008

Some bloggers makes the mistake to write their first posts under the name “admin”, until they realize that it’s absolutely not personal. But then, modifying author attribution on each post takes a lot of time. To achieve this, we’ll use phpmyadmin and the SQL language. As the following commands will modify your WordPress database, don’t forget to create a backup before running any command throught phpmyadmin. The first thing to do is getting the IDs of WordPress users. Once logged in phpmyadmin, insert the following... [Read the full story]

Page 1 of 212»