StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have -- and this forum will be removed on July 1st, 2013.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
  #1  
Old 03-18-2010, 11:47 AM
fmf fmf is offline
Registered User
Genesis Member
Pro Plus Member
 
Join Date: Dec 2009
Posts: 29
Default author.php duplicate info

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  
Old 03-18-2010, 07:38 PM
adew adew is offline
Community Moderator
 
Join Date: Oct 2008
Location: Genève, Suisse
Posts: 14,270
Default

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  
Old 03-19-2010, 04:38 PM
fmf fmf is offline
Registered User
Genesis Member
Pro Plus Member
 
Join Date: Dec 2009
Posts: 29
Default

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; ?>&amp;h=<?php echo get_theme_mod('archive_thumb_height'); ?>&amp;w=<?php echo get_theme_mod('archive_thumb_width'); ?>&amp;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(); ?> &middot; <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>&nbsp;<?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(', ') ?> &middot; <span class="tags"><?php _e("Tagged with", 'studiopress'); ?> <?php the_tags('') ?></span></p>
            </div>
			
                
				<?php endwhile; ?>
                
               	<?php endif; ?>
			
            <p><?php posts_nav_link(' — ', __('&laquo; Previous Page', 'studiopress'), __('Next Page &raquo;', 'studiopress')); ?></p>
            			
		</div>
			
		</div>
		</div>		
	</div>
	
<?php get_sidebar(); ?>
		
</div>

<?php get_footer(); ?>
  #4  
Old 03-20-2010, 03:26 AM
adew adew is offline
Community Moderator
 
Join Date: Oct 2008
Location: Genève, Suisse
Posts: 14,270
Default

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 $recent = new WP_Query('showposts=1'); while($recent->have_posts()) : $recent->the_post();?>
ie like this:
PHP Code:
<?php // $recent = new WP_Query('showposts=1'); while($recent->have_posts()) : $recent->the_post();?>
and do the same with this:
PHP Code:
<?php endwhile; ?>
ie this:
PHP Code:
<?php // endwhile; ?>
just above the authorposts div.
__________________
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  
Old 03-22-2010, 12:27 PM
fmf fmf is offline
Registered User
Genesis Member
Pro Plus Member
 
Join Date: Dec 2009
Posts: 29
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -5. The time now is 07:01 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.