Author Bio Shortcode
This plugin allows you to enter [author_bio] anywhere within the content of a post or page to display the biography of the author of that post or page. The output now contains HTML, which can be customised very easily with extra parameters – see Installation for a how-to – to sit around the bio, as
About this tool.
This plugin allows you to enter [author_bio] anywhere within the content of a post or page to display the biography of the author of that post or page.
The output now contains HTML, which can be customised very easily with extra parameters – see Installation for a how-to – to sit around the bio, as defined in /wp-admin/profile.php.
By default the shortcode produces the author of that post or page. However, extra parameters enable you to specify a different user whose bio you want to print out – see usage instructions.
Feature requests welcomed with open arms!
Getting started.
Simple install in /wp-content/plugins like any other!
Usage
Simply place [author_bio] anywhere within your post/page content.
Additionally, you can pass one of the following attributes to specify a different user;
- 01id – accepts the user ID
- 02username – accepts the username
- 03email – accepts the user e-mail address
For example; [author_bio] [author_bio id=”4″] [author_bio username=”admin”] [author_bio email=”user@example.com”]
You can also have the author’s avatar added, by using the avatar parameter like so; [author_bio avatar=”yes”] Warning: if you don’t want the avatar, do not change the above to “no” as it will not work, simply change back to [author_bio] alone.
It’s possible to add the author’s name, too by adding the name parameter; [author_bio name=”yes”] Warning: As with the avatar option, leave the name parameter out completely to hide the name.
Additionally, you can make the author’s name link to his/her website as defined in their profile; [author_bio name=”yes” name_link=”yes”]
You can also customise the HTML output which defaults to;
… the author bio …
There are 7 parameters that describe the HTML above;
- 04‘container_element’ defaults to ‘div’ and creates the first div in the example above
- 05‘container_class’ defaults to ‘author_bio_shortcode’ as seen above
- 06‘name_container’ defaults to h3
- 07‘name_class’ defaults to ‘name’
- 08