Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Start Get Author Link */
- function my_authors_meta($atts){
- /* If the user passed an integer then good to go */
- if (is_numeric($atts[0])) {
- $authorid = $atts[0];
- echo '<a href="';
- echo get_bloginfo('url');
- echo '/author/';
- echo the_author_meta('user_nicename', $authorid );
- echo '/">';
- echo the_author_meta('display_name', $authorid );
- echo '</a>';
- }
- }
- add_shortcode('author', 'my_authors_meta');
- add_filter('my_authors_meta', 'do_shortcode');
- /* Start Get Author Link call [author id] */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement