Author Meta Box

On all articles (posts) and author archives, we have a nice meta box to showcase information about the author.

Author Meta Output

This metabox shows the following components.

Author Avatar

As used by WordPress itself, the gravatar of the author is shown with a size of 96X96px.

Author Bio

This is the Biographical Info filled by the author.

Social Links

By default only the website (or the author-url) of the author is shown (if not left empty).

Author Meta

If you have installed the WordPress SEO plugin and authors have filled in their social networking links, then facebook, twitter and google plus is also show.

However, there is a way to extend the number of buttons and links. The code sample below shows how.

[php]
/**
* Add extra buttons to the author meta box
* @param array $buttons Array of buttons
* @return array Modified array
*/
function my_author_extra_buttons( $buttons ) {
// The extension below will search the author meta
// for a key "linkedin".
// This is same as the key to the array itself and you will need to have some plugin
// or your functions to let the authors edit and/or put values to this key.
// Otherwise it will not just work out of the box.
$buttons[‘linkedin’] = array(
// The title is shown as tooltip
‘title’ => ‘Linked In’,
// A valid icon
// @see http://wpquark.com/kb/wp-knowledge-base-theme/kb-components/available-glyphicons-icomoon-icons/
‘icon’ => ‘ipt-icon-linkedin’,
);
return $buttons;
}
add_filter( ‘ipt_kb_author_meta_buttons’, ‘my_author_extra_buttons’ );
[/php]

Do note, that the code above is just for “showing” custom author meta. It will not add functionality to edit/add them from author profile. For that, you might want to use some plugin like Extra User Details.

For more extensibility you can completely override the function ipt_kb_author_meta as it is pluggable.

Swashata has written 257 articles

Hi there, I am the Lead Developer at WPQuark.com. I love to create something beautiful for WordPress and here I write about how to use them. When I am not working, usually I am doing a number of other creative things ;).

4 thoughts on “Author Meta Box

  1. Bob Lima says:

    Hi, Swashata!

    First of all, i want to thank you for this really nice and helpful theme.

    I hope you understand i’m just a curious user, lol.

    My question is: Can i get rid of the whole comment meta (everything below the post or page)?

    The fact is that i’m using the theme for an internal information exchange in the company i work, but really don’t need the comments area.

    If so, how could i do that?

    Thanks in advance!

  2. Alok V says:

    which plugin have you used to add the below checkboxes

    X Notify me of follow-up comments by email.
    X Notify me of new posts by email.

    Thank You
    Alok V

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.