![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I am using the author.php page from the agent theme to create individual author pages within the news theme. I had no trouble implementing this and the page worked exactly as expected until last monday when suddenly the author information began to duplicate. I had not changed the code. I have tried:
- changing showposts to 0 / 1 / 2 (i get 6x / 2x / 3x info respectively) - posting the agent author.php file as-is (still get 2x info) Any help would be appreciated!! BTW i am running WPMU Example URL: http://msmagazine.com/blog/blog/author/admin/ thanks in advance, Courtney p.s. i posted this over at the agent board a week ago but didnt get a response - thought it might be better over here |
|
#2
|
|||
|
|||
|
Hi,
Can you post the page template you're using?
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
|
#3
|
|||
|
|||
|
Here is the code of the modified page. The duplication also happened when i used the agent author.php file without modifications. Thank you for looking.
Code:
<?php get_header(); ?>
<div id="content">
<div id="contentleft">
<div class="post">
<?php include(TEMPLATEPATH."/breadcrumb.php");?>
<div class="postarea">
<?php $recent = new WP_Query('showposts=1'); while($recent->have_posts()) : $recent->the_post();?>
<h3><?php _e('Ms. Blogger', 'studiopress'); ?></h3>
<?php if(isset($_GET['author_name'])) :
$curauth = get_userdatabylogin($author_name);
else :
$curauth = get_userdata(intval($author));
endif;
?>
<div class="authorbio">
<p><?php if(file_exists(TEMPLATEPATH.'/images/team/'.$curauth->ID.'.jpg')) : ?>
<img class="thumb" src="<?php bloginfo('template_url'); ?>/images/team/<?php echo $curauth->ID; ?>.jpg" alt="<?php echo $curauth->display_name; ?>" title="<?php echo $curauth->display_name; ?>" />
<?php endif; ?>
<b><?php echo $curauth->display_name; ?></b><br />
<?php echo $curauth->description; ?></p>
<p></p>
<p><strong><?php _e('Website: ', 'studiopress'); ?></strong><a href="<?php echo $curauth->user_url; ?>" target="_blank"><?php echo $curauth->user_url; ?></a> <br />
<strong><?php _e('Twitter: ', 'studiopress'); ?></strong><a href="<?php _e('http://twitter.com/', 'studiopress'); ?><?php echo $curauth->twitter; ?>" target="_blank"><?php echo $curauth->twitter; ?></a></p>
</div>
<div class="clear"></div>
<?php endwhile; ?>
<div class="authorposts">
<h3><?php echo $curauth->display_name; ?><?php _e('\'s Posts', 'studiopress'); ?></h3>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if( get_post_meta($post->ID, "thumb", true) ): ?>
<?php $theImageSrc = get_image_path(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark"><img class="thumb" src="<?php bloginfo('template_directory'); ?>/tools/timthumb.php?src=<?php echo $theImageSrc; ?>&h=<?php echo get_theme_mod('archive_thumb_height'); ?>&w=<?php echo get_theme_mod('archive_thumb_width'); ?>&zc=1" alt="<?php the_title(); ?>" /></a>
<?php else: ?>
<?php endif; ?>
<h4><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h4>
<div class="date">
<p><span class="time"><?php the_time('F j, Y'); ?></span> <?php _e("by", 'studiopress'); ?> <?php the_author_posts_link(); ?> · <span class="icomment"><a rel="nofollow" href="<?php the_permalink(); ?>#respond"><?php comments_number(__('Leave a Comment', 'studiopress'), __('1 Comment', 'studiopress'), __('% Comments', 'studiopress')); ?></a></span> <?php edit_post_link(__('(Edit)', 'studiopress'), '', ''); ?></p>
</div>
<?php the_excerpt();?>
<div class="clear"></div>
<div class="postmeta2">
<p><?php _e("Filed under", 'studiopress'); ?> <?php the_category(', ') ?> · <span class="tags"><?php _e("Tagged with", 'studiopress'); ?> <?php the_tags('') ?></span></p>
</div>
<?php endwhile; ?>
<?php endif; ?>
<p><?php posts_nav_link(' — ', __('« Previous Page', 'studiopress'), __('Next Page »', 'studiopress')); ?></p>
</div>
</div>
</div>
</div>
<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>
|
|
#4
|
|||
|
|||
|
I tried using your file on a test site, and couldn't recreate the duplication.
Let's try a couple of things. First,comment out this: PHP Code:
PHP Code:
PHP Code:
PHP Code:
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
|
#5
|
|||
|
|||
|
Ok -- I am uploading now .... OMG it worked!
Thank you Thank you! Any idea why this happened? I am still mystified as it randomly presented itself (the duplicates) one day without any code changes. Thank you again! |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| author info | myboxingfans | General Discussion | 1 | 07-04-2010 04:25 PM |
| How do i add post author info? | blokebuddy | General Discussion | 1 | 03-12-2010 02:20 PM |
| Author info box after posts? | jayvega | General Discussion | 1 | 01-28-2010 09:59 PM |
| Author/photo info | teyonas | General Discussion | 8 | 05-10-2009 04:44 PM |
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us