Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Plugin Name: Shortcode - autor wpisu
Description: Dodaje informację o autorze. Użycie: [wpa_post_author]
Author URI:
function wpa_post_author() {
$author = '<style>.wpa-post-author-info{clear:both;}.wpa-post-author-info img{float:left;margin-right:15px;}.wpa-post-author-info h5{margin-bottom:10px;}</style>';
$author .= '<div class="wpa-post-author-info">';
$author .= '<h5>O autorze</h5>';
$author .= get_avatar( get_the_author_meta('user_email'), 80 );
$author .= wpautop( '<strong>'. get_the_author_meta('display_name') .'</strong> - '. get_the_author_meta('description') );
$author .= '</div><!-- /.wpa-post-author-info -->';
return $author;
add_shortcode('wpa_post_author', 'wpa_post_author');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.