Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <ul class="double-cloumn clearfix">
- <li id="left-column">
- <ul class="blog-main-post-container">
- <?php
- $thisauthor = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
- ?>
- <div style="float: right;">
- <? if(function_exists('get_avatar')) { echo get_avatar($thisauthor->user_email, 96, "" ); } ?> </div>
- <h2><?php echo $thisauthor->first_name . " " . $thisauthor->last_name; ?> (<?php echo $thisauthor->display_name; ?>)</h2>
- <p><a href="<? echo $thisauthor->user_url; ?>"><? echo $thisauthor->user_url; ?></a><br />
- <a href="mailto:<? echo $thisauthor->user_email; ?>">email</a>
- <p><?php echo $thisauthor->description; ?> </p>
- <?php if (have_posts()) : ?>
- <h2>Recent Posts </h2>
- <ul>
- <? while (have_posts()) : the_post(); ?>
- <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
- <?php endwhile; else: ?>
- <li>This user hasn't published any posts. </li>
- <?php endif; ?>
- </ul>
- <?php
- $some_email = $thisauthor->user_email;
- $querystr = "
- SELECT comment_ID, comment_post_ID, comment_content, post_title
- FROM $wpdb->comments, $wpdb->posts
- WHERE comment_author_email = '$some_email'
- AND comment_approved = 1
- GROUP BY comment_ID
- ORDER BY comment_ID DESC
- ";
- $comments_array = $wpdb->get_results($querystr, OBJECT);
- if ($comments_array): ?>
- <h2>Recent Comments </h2>
- <ul>
- <? foreach ($comments_array as $comment):
- setup_postdata($comment);
- echo "<li><a href='". get_bloginfo('url') ."/?p=".$comment->comment_post_ID."'>Comment on ". $comment->post_title. "</a><br />". $comment->comment_content . "</li>";
- endforeach; ?>
- </ul>
- <? endif; ?>
- </ul>
- </li>
- </ul>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement