WordPress.org

Forums

Author not showing on posts (1 post)

  1. aydblog
    Member
    Posted 2 years ago #

    Hello,

    I really want the author to show next to the time on http://about-your-dress.com but can't work out how to do it. I've tried editing The Loop; this is what my index.php shows at present (with my edited in author line):

    <?php get_header();
    			if(of_get_option('slider_category')):
    		    if ( $paged < 2  && of_get_option('slider_radio', '1')) : ?>
         		<div id="slider" class="nivoSlider">
    				<?php
    
    					$tmp = $wp_query;
    					$cat = of_get_option('slider_category');
    					$wp_query = new WP_Query('cat='.$cat.'');
    					if(have_posts()) :
    					    while(have_posts()) :
    					        the_post();
    					?>
    			    <?php if(wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'nivo-thumb')) {
                      $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'nivo-thumb');
                    }else {
                      $image[0] = get_template_directory_uri()."/images/nivo-thumb-placeholder.png";
                    }
              ?>
    						<a>" rel="bookmark" title="<?php the_title(); ?>"><img src="<?php echo $image[0]; ?>" alt="<?php the_title(); ?>" title="#htmlcaption_<?php the_ID(); ?>" width="620" height="300" /></a>
    
    					<?php
    						endwhile;
    					?>
    					<?php endif; ?>
    				</div><!-- close #slider -->
    
    					<?php
    						if(have_posts()) :
    						    while(have_posts()) :
    						        the_post();
    						?>
    						<div id="htmlcaption_<?php the_ID(); ?>"  class="nivo-html-caption">
    						    <p><?php the_time( get_option('date_format') ); ?> by <?php the_author_posts_link() ?></p>
    						    <h2><a>"><?php the_title(); ?></a></h2>
    						</div>
    	    				<?php
    							endwhile;
    						?>
    						<h3 class="block-title"><?php _e('Newest','delicacy')?></h3>
    						<?php endif;
    						$wp_query = $tmp;
    						?>
    				<?php endif; ?>
    			<?php endif; ?>
                        <div class="post-list">
    
    					<?php if (have_posts()) : ?>
    
                        <?php while (have_posts()) : the_post(); ?>
    
    					<div id="post-<?php the_ID(); ?>" <?php post_class('list-post-item'); ?>>
                            <?php if(of_get_option('hp_settings') == 1 || !of_get_option('hp_settings')) : ?>
    
    						<h2><a>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    						<div class="entry-meta"><span class="date"><?php the_time( get_option('date_format') ); ?></span><span class="comments"><?php comments_popup_link(__('No comments','delicacy'), __('1 comment','delicacy'), __('Comments: %','delicacy')); ?></span></div>
    						<div class="entry-content">
    						<?php the_content(); ?>
    						</div>
    
    						<?php elseif (of_get_option('hp_settings') == 2) :?>
    
    						<?php if (  (function_exists('has_post_thumbnail')) && (has_post_thumbnail())  ) { ?>
    						<a>" rel="bookmark" title="<?php the_title(); ?>"><?php the_post_thumbnail(); ?></a>
    						<?php } ?>
    						<h2><a>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    						<div class="entry-meta"><span class="date"><?php the_time( get_option('date_format') ); ?></span><span class="comments"><?php comments_popup_link(__('No comments','delicacy'), __('1 comment','delicacy'), __('Comments: %','delicacy')); ?></span></div>
    						<div class="entry-content">
    						<?php the_excerpt(); ?>
    						</div>
    
    						<?php endif; ?>
    
    					</div>
    					<div class="deco-line"></div>
    					<?php endwhile; ?>
    						<div class="pagination">
    					    <span class="left"><?php next_posts_link('« '.__('Previous Entries','delicacy')) ?></span> <span class="right"><?php previous_posts_link(__('Next entries','delicacy').' »') ?></span>
    						</div>
    					<?php else : ?>
    
    								<h2 class="post-title"><?php _e('Not Found','delicacy') ?></h2>
    
    							<?php endif; ?>
    
    					</div><!-- end #post-list -->
    				</div><!-- end #content -->
    			<?php get_sidebar(); ?>
    			</div><!-- end #content-wrapper -->
    			<?php get_footer(); ?>

    Thanks in advance!

    [Please post code between backticks or use the code button. Or better still - use a pastebin. Your posted code has been permanently damaged/corrupted by the forum's parser.]

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags