Help Urgently Needed " Authors Page "
Hi all i have found a piece of code that i would need to display posts from a specific user, when i implement the code none of the authors data is pulled out. is there a way of modifying the code below so i can set it to display posts from user ID 1
my site is live and i have been trying for weeks to figure a way to display these posts in a page your help would be appreciated
thanks Chris
<?php
/*
Template Name: Shops
*/
if ( isset($_GET['author_name']) ) :
$curauth = get_userdatabylogin($author_name);
else :
$curauth = get_userdata( intval($author) );
endif;
?>
<?php get_header(); ?>
<div class="content">
<div class="content_botbg">
<div class="content_res">
<div id="breadcrumb">
<?php if ( function_exists('cp_breadcrumb') ) cp_breadcrumb(); ?>
</div>
<!-- left block -->
<div class="content_left">
<div class="shadowblock_out">
<div class="shadowblock">
<h1 class="single dotted"><?php echo($curauth->display_name); ?><?php _e('\'s Profile','appthemes')?> </h1>
<div class="post">
<div id="user-photo"><?php appthemes_get_profile_pic($curauth->ID, $curauth->user_email, 96) ?></div>
<div class="author-main">
<ul class="author-info">
<li><div class="dotted"><strong><?php _e('Member Since:','appthemes');?></strong> <?php echo date_i18n(get_option('date_format'), strtotime($curauth->user_registered)); ?></div></li>
<li><div class="globeico"></div><?php if($userdata->user_url) { ?><a href="<?php echo $userdata->user_url; ?>" target="_blank"><?php echo $userdata->user_url; ?></a><?php } else { _e('N/A','appthemes'); } ?></li>
<li><div class="twitterico"></div><?php if($userdata->twitter_id) { ?><a href="http://twitter.com/<?php echo $userdata->twitter_id; ?>" target="_blank"><?php _e('Twitter','appthemes')?></a><?php } else { _e('N/A','appthemes'); } ?></li>
<li><div class="facebookico"></div><?php if($userdata->facebook_id) { ?><a href="http://facebook.com/<?php echo $userdata->facebook_id; ?>" target="_blank"><?php _e('Facebook','appthemes')?></a><?php } else { _e('N/A','appthemes'); } ?></li>
</ul>
</div>
<h3 class="dotted"><?php _e('Description:','appthemes'); ?></h3>
<p><?php if($curauth->user_description) { ?><?php echo $curauth->user_description; ?><?php } else { _e('N/A','appthemes'); } ?></p>
<div class="pad10"></div>
<div class="addthis_toolbox addthis_default_style">
<a class="addthis_button_facebook"></a>
<a class="addthis_button_twitter"></a>
<a class="addthis_button_email"></a>
<a class="addthis_button_print"></a>
<a href="http://addthis.com/bookmark.php?v=250" class="addthis_button_compact"></a>
<a class="addthis_button_facebook_like"></a>
</div>
</p>
<h3 class="dotted"><?php _e('All Items Listed by','appthemes')?> <?php echo($curauth->display_name); ?><?php _e(':','appthemes')?></h3>
</div><!--/directory-->
</div><!-- /shadowblock-flush -->
</div><!-- /shadowblock_out-flush -->
<!-- author ads -->
<?php
// show only ads from this author
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
query_posts( array('post_type' => 'ad_listing', 'post_status' => 'publish', 'author' => $curauth->ID, 'paged' => $paged) );
?>
<?php get_template_part( 'loop', 'ad_listing' ); ?>
</div><!-- /content_left -->
<?php get_sidebar(); ?>
<div class="clr"></div>
</div><!-- /content_res -->
</div><!-- /content_botbg -->
</div><!-- /content -->
<script type="text/javascript" src="http://s7.addthis.com/
js/250/addthis_widget.
js#"></script>
<?php get_footer(); ?>