• Resolved budcolby

    (@budcolby)


    The post on our blog do not show who the author is. I don’t know how to get it there, I have not found a place to turn it on, or how to change the author in the event of a guest author. is this a WordPress setting, or a theme setting. don’t know what to do.

Viewing 4 replies - 1 through 4 (of 4 total)
  • It is a theme setting.

    For instance, if you look in the Default theme’s index.php you’ll see this line of code in The_Loop:
    <!-- by <?php the_author() ?> -->

    If you remove the comments (that would be the <!-- and --> then it would display “by authorName” above the post.

    You can add the same logic to your own themes.

    Does that help?

    Thread Starter budcolby

    (@budcolby)

    I am using The Theme “emerald Stretch” and this is the “main index template.php” am I blind? I don’t see anything that looks like that? I don’t know were to input that line.

    <?php get_header(); ?>
    
    <!-- CONTENT -->
    
      <div id="content-wrapper">
        <div id="content">
        	<?php if (have_posts()) : ?>
        		<?php while (have_posts()) : the_post(); ?>
        			<h1><a>" rel="bookmark" title="<?php _e('Permanent Link to ','emerald_stretch'); ?><?php the_title(); ?>"><?php the_title(); ?></a></h1>
        			<?php the_excerpt(__('Read the rest of this post &raquo;','emerald_stretch')); ?>
        			<p id="postmeta">
    					  <img src="<?php bloginfo('template_directory'); ?>/img/calendar.gif" /><a>/<?php the_time('Y') ?>/<?php the_time('m') ?>/" title="<?php _e('View all posts for the month of','emerald_stretch'); ?> <?php the_time(__('F, Y','emerald_stretch')) ?>"><?php the_time(__('F j, Y','emerald_stretch')) ?></a>
    					  &nbsp;<img src="<?php bloginfo('template_directory'); ?>/img/tag.gif" /><?php the_tags(__('Tags','emerald_stretch') . ':&nbsp;', ', ', '&nbsp;'); ?>
                <?php _e('Posted&nbsp;in', 'emerald_stretch'); ?>:&nbsp;<?php the_category(', ') ?>
    					  &nbsp;<img src="<?php bloginfo('template_directory'); ?>/img/comments.gif" /><?php comments_popup_link(__('No Comments','emerald_stretch'), __('One Comment','emerald_stretch'), __('% Comments','emerald_stretch'), '', __('Comments Closed', 'emerald_stretch')); ?>
    					  <span class="editlink"><?php edit_post_link(__('Edit','emerald_stretch'),'',''); ?></span>
    				  </p>
    
        		<?php endwhile; ?>
    
    			<ul class="postnav">
     				<li class="left"><?php next_posts_link(__('&laquo; Older Entries','emerald_stretch')) ?>
      			<li class="right"><?php previous_posts_link(__('Newer Entries &raquo;','emerald_stretch')) ?>
    
    		<?php else : ?>
    			  <h1><?php _e('Oops! This blog is brand new','emerald_stretch'); ?></h1>
    			  <p><?php _e('No posts were found.','emerald_stretch'); ?></p>
    		<?php endif; ?>
    
        </div>
    <!-- /CONTENT -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Well, if your theme doesn’t currently show the author then you probably won’t see the code, right? 😉 I showed you what’s in the Default theme so you could see where it is (if you were to go look) to get a feel for where you might add it to your own.

    That being said… perhaps a nice starting point would be to put it in that meta section?
    Find:
    <p id="postmeta">
    and add a line after that to contain:
    <?php the_author() ?>
    And see what you get.

    Thread Starter budcolby

    (@budcolby)

    Thank you so much! That worked

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Author label’ is closed to new replies.