NOTE: This information is only useful for WordPress theme developers. If you’re not familiar with PHP code, you can still add Fanciest Author Box to your posts automatically, using a widget or using shortcode.
Fanciest Author Box can be added to your theme using
<?php if( function_exists( 'ts_fab' ) ) ts_fab(); ?>
Function is wrapped in
function_exists check to make sure your theme doesn’t break when you deactivate Fanciest Author Box plugin.
Using this function will display Fanciest Author Box with its default settings – tabs you specified in Tabs Settings page and “best guess” author, for example, if you’re adding template tag to a single post it will display Fanciest Author Box for that post author. However, for full control over what’s being displayed, you can use following parameters:
ts_fab( $context, $authorid, $tabs )
- $context (optional) – text string that is used to construct Fanciest Author Box wrapper ID, for example, if you use ‘author-page’ wrapper element ID will be ‘ts-fab-author-page’.
- $authorid (optional) – integer, user ID, see how you can find any user’s ID at the bottom of Adding Fanciest Author Box Using Shortcode page.
- $tabs (string) – comma separated string of tabs to include, values you can use here are: bio, twitter, facebook, googleplus, latest_posts and custom.