Help with author page? Sidebar broken
-
Hi guys, I am using this author page on my WordPress site: https://wpsplash.com/how-to-create-a-wordpress-authors-page/ Apparently it does not work so well with the MobileWorld theme… I was wondering if anyone could help me? The sidebar displays under the authors instead of, well, on the side.
You can view my author page here: https://www.thestevequest.com/wp/steves-team
And this is the code for the page:
<?php get_header(); ?> <style type='text/css'> .author {} .author h3 {margin-bottom:2px;font-weight:bold} .author h5 {font-size: 13px; font-style:italic;font-weight:normal} /* .author .description {overflow:hidden} */ .author .description p {margin:0;padding-right:5px} .author .avatar {float:right;clear:both;border:5px solid #f2f1f1} .author h4 {background:#f2f1f1;padding:5px;margin:10px 0 0px 0;border:0px dotted #ccc;font-size: 12px} .author .connect {border-top: 1px solid #ccc;border-bottom:1px solid #ccc;list-style:none;margin:0;padding:5px 0 0px 0;width:100%;overflow:hidden;margin-bottom:60px} .author .connect li {float:left;margin-right:20px} </style> <div class="span-24" id="contentwrap"> <div class="span-16"> <h2 class='pagetitle'>Steve's Team</h2> <div id="content"> <?php $authors = $wpdb->get_results('SELECT DISTINCT post_author FROM '.$wpdb->posts); if($authors): foreach($authors as $author): ?> <a name="<?php the_author_meta('display_name', $author->post_author); ?>"></a> <div class='author' id='author-<?php the_author_meta('user_login', $author->post_author); ?>'> <h3><?php the_author_meta('display_name', $author->post_author); ?></h3> <h5><?php the_author_meta('user_title', $author->post_author); ?></h5> <?php echo get_avatar(get_the_author_meta('user_email', $author->post_author), 150); ?> <?php if(get_the_author_meta('description', $author->post_author)): ?> <div class='description'> <p><?php the_author_meta('description', $author->post_author); ?></p> </div> <?php endif; ?> <?php $recentPost = new WP_Query('author='.$author->post_author.'&showposts=1'); while($recentPost->have_posts()): $recentPost->the_post(); ?> <h4>Recent Post: <a href='<?php the_title();?>'><?php the_title(); ?></a></h4> <?php endwhile; ?> <?php if(get_the_author_meta('twitter', $author->post_author) || get_the_author_meta('facebook', $author->post_author) || get_the_author_meta('linkedin', $author->post_author) || get_the_author_meta('xbox', $author->post_author) || get_the_author_meta('psn', $author->post_author)): ?> <ul class='connect'> <?php if(get_the_author_meta('twitter', $author->post_author)): ?> <li><a href='https://twitter.com/<?php the_author_meta('twitter', $author->post_author); ?>'><img src="<?php bloginfo('template_directory'); ?>/images/socialicons/twitter.png" width="32" height="32" alt="Twitter" /></a></li> <?php endif; ?> <?php if(get_the_author_meta('facebook', $author->post_author)): ?> <li><a href='https://www.facebook.com/<?php the_author_meta('facebook', $author->post_author); ?>'><img src="<?php bloginfo('template_directory'); ?>/images/socialicons/facebook.png" width="32" height="32" alt="Facebook" /></a></li> <?php endif; ?> <?php if(get_the_author_meta('linkedin', $author->post_author)): ?> <li><a href='https://www.linkedin.com/in/<?php the_author_meta('linkedin', $author->post_author); ?>'><img src="<?php bloginfo('template_directory'); ?>/images/socialicons/linkedin.png" width="32" height="32" alt="LinkedIn" /></a></li> <?php endif; ?> <?php if(get_the_author_meta('xbox', $author->post_author)): ?> <li><a href='https://live.xbox.com/en-US/MyXbox/Profile?Gamertag=<?php the_author_meta('xbox', $author->post_author); ?>'><img src="<?php bloginfo('template_directory'); ?>/images/socialicons/xbox.png" width="32" height="32" alt="Xbox Live" /></a></li> <?php endif; ?> <?php if(get_the_author_meta('psn', $author->post_author)): ?> <li><a href='https://us.playstation.com/publictrophy/index.htm?onlinename=<?php the_author_meta('psn', $author->post_author); ?>/'><img src="<?php bloginfo('template_directory'); ?>/images/socialicons/psn.png" width="32" height="32" alt="PSN" /></a></li> <?php endif; ?> <?php if(get_the_author_meta('steam', $author->post_author)): ?> <li><a href='https://steamcommunity.com/id/<?php the_author_meta('steam', $author->post_author); ?>/'><img src="<?php bloginfo('template_directory'); ?>/images/socialicons/steam.png" width="32" height="32" alt="steam" /></a></li> <?php endif; ?> </ul> <?php endif; ?> <?php endforeach; endif; ?> </div> </div> </div> <?php get_sidebars(); ?> <?php get_footer(); ?>
Thanks!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Help with author page? Sidebar broken’ is closed to new replies.