WordPress.org

Ready to get started?Download WordPress

Forums

WP Resume
Add resume to authors page. (1 post)

  1. Masteecate
    Member
    Posted 2 years ago #

    I want to add the resume to my authors.php page, so every author can't have their own resume shown.

    This is my authors.php (look for <?php echo do_shortcode('[wp_resume author="???"]'); ?>):

    <?php
    // Template Name: Authors List
    get_header(); ?>
    	<style type='text/css'>
    	.author { margin-bottom: 80px; width:319px; float:left; border:1px solid #e7e7e7; margin-top:-1px; margin-left:-1px;}
    	.author:hover {background-color:#fcff79;}
    	.author h3 { margin-bottom: 10px; padding:5px 0px 0px 5px; font-size:21px;}
    	.author .description { width: 100%; overflow: hidden;}
    	.description_1 {float:left; padding:5px;}
    	.author .description p { float: left; margin: 0; padding:5px; }
    	.author .avatar {float:left; border: 0px solid #ccc; padding-right:0px; }
    	.avatar_1 {float:left; margin:5px;}
    	.article h4 { background: #f7f7f7; padding: 5px; border-top: 0px dotted #ccc; font-weight:normal;}
    	.article h4 a{ font-weight:bold;}
    	.article .connect { border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; list-style: none; margin: 0; overflow: hidden; padding: 10px 5px; }
    	.article .connect li { float: left; margin: 0px 4px; list-style: none; }
    
    /* Z-index of #mask must lower than #boxes .window */
    #mask {
      position:absolute;
      z-index:9000;
      background-color:#000;
      display:none;
    }
    
    #boxes .window {
      position:absolute;
      width:440px;
      height:200px;
      display:none;
      z-index:9999;
      padding:20px;
    }
    
    /* Customize your modal window here, you can add background image too */
    #boxes #dialog {
      width:375px;
      height:203px;
    }
    </style>
    
    	<div id='content' class='narrowcolumn'>
    		<h2 class='pagetitle'>Our Authors</h2>
    
    		<?php
    
    		// $excluded = "1";  // To exclude ID 1
    		// $authors = $wpdb->get_results('SELECT DISTINCT post_author FROM '.$wpdb->posts. " WHERE ID NOT IN ($excluded)");
    
    		$excluded = "0";  // To exclude IDs 1,33,4
    		$sql = 'SELECT DISTINCT post_author FROM '.$wpdb->posts. " WHERE post_author NOT IN ($excluded)";
    		$authors = $wpdb->get_results($sql);
    
    		?>
    
    <ul class="mcol">
    		<?php
    		if($authors):
    		foreach($authors as $author):
    		?>
    <li class="article">
    
    			<div class='description'>
    
    				<div class='avatar_1'><?php echo get_avatar(get_the_author_meta('user_email', $author->post_author), 100); ?></div>
    
    				<div class='description_3'>
    					<h3><?php the_author_meta('user_login', $author->post_author); ?></h3>
    					<?php the_author_meta('user_firstname', $author->post_author); ?> <?php the_author_meta('user_lastname', $author->post_author); ?>
    				</div>
    
    				<div class='description_2'>
    
    			<ul class='connect'>
    
    				<li><a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'"><img src='<?php echo get_bloginfo('template_url'); ?>/images/cv.png' title='CV' alt='CV' /></a></li>
    
    <div id="light" class="white_content">
    
    <?php echo do_shortcode('[wp_resume author="???"]'); ?>
    
    <a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">Close</a></div>
    <div id="fade" class="black_overlay"></div>
    
    				<?php
    				// Website
    				if(get_the_author_meta('user_url', $author->post_author)): ?>
    				<li><a href='<?php the_author_meta('user_url', $author->post_author); ?>/'><img src='<?php echo get_bloginfo('template_url'); ?>/images/website.png' alt='website' title='<?php the_author_meta('user_url', $author->post_author); ?>' /></a></li>
    				<?php else: ?>
    				<li><img src='<?php echo get_bloginfo('template_url'); ?>/images/no_website.png' alt='no website' title='no website' /></li>
    				<?php endif; ?>
    
    				<?php
    				// Youtube
    				if(get_the_author_meta('youtube', $author->post_author)): ?>
    				<li><a href='http://youtube.com/<?php the_author_meta('youtube', $author->post_author); ?>'><img src='<?php echo get_bloginfo('template_url'); ?>/images/youtube.png' alt='youtube' title='<?php the_author_meta('youtube', $author->post_author); ?>' /></a></li>
    				<?php else: ?>
    				<li><img src='<?php echo get_bloginfo('template_url'); ?>/images/no_youtube.png' alt='no youtube' title='no youtube' /></li>
    				<?php endif; ?>
    
    				<?php
    				// Tumblr
    				if(get_the_author_meta('tumblr', $author->post_author)): ?>
    				<li><a href='http://<?php the_author_meta('tumblr', $author->post_author); ?>.tumblr.com'><img src='<?php echo get_bloginfo('template_url'); ?>/images/tumblr.png' alt='tumblr' title='<?php the_author_meta('tumblr', $author->post_author); ?>' /></a></li>
    				<?php else: ?>
    				<li><img src='<?php echo get_bloginfo('template_url'); ?>/images/no_tumblr.png' alt='no tumblr' title='no tumblr' /></li>
    				<?php endif; ?>
    
    				<?php
    				// Twitter
    				if(get_the_author_meta('twitter', $author->post_author)): ?>
    				<li><a href='http://twitter.com/<?php the_author_meta('twitter', $author->post_author); ?>'><img src='<?php echo get_bloginfo('template_url'); ?>/images/twitter.png' alt='twitter' title='<?php the_author_meta('twitter', $author->post_author); ?>' /></a></li>
    				<?php else: ?>
    				<li><img src='<?php echo get_bloginfo('template_url'); ?>/images/no_twitter.png' alt='no twitter' title='no twitter' /></li>
    				<?php endif; ?>
    
    				<?php
    				// Facebook
    				if(get_the_author_meta('facebook', $author->post_author)): ?>
    				<li><a href='http://www.facebook.com/<?php the_author_meta('facebook', $author->post_author); ?>'><img src='<?php echo get_bloginfo('template_url'); ?>/images/facebook.png' alt='facebook' title='<?php the_author_meta('facebook', $author->post_author); ?>' /></a></li>
    				<?php else: ?>
    				<li><img src='<?php echo get_bloginfo('template_url'); ?>/images/no_facebook.png' alt='no facebook' title='no facebook' /></li>
    				<?php endif; ?>
    
    			</ul>
    
    				</div>
    
    				<?php if(get_the_author_meta('description', $author->post_author)): ?>
    					<div class='description_1'><?php the_author_meta('description', $author->post_author); ?></div>
    				<?php endif; ?>
    
    <div style='clear:both'></div>
    			</div><div style='clear:both'></div>
    
    			<?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_permalink();?>'><?php the_title(); ?></a><br />
    			Other posts by <?php the_author_posts_link(); ?></h4>
    
    		<?php endwhile; ?>
    </li>
    		<?php endforeach; endif; ?>
    	</ul></div>
    <?php get_footer(); ?>

    It shows the resume of the admin on everybodys "cv".
    Thanks for the help!

    http://wordpress.org/extend/plugins/wp-resume/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags