Author timestamp not displayed (6 posts)

  1. jedimacfan
    Posted 8 years ago #

    I am using the iTheme template for a blog and just realized that there is no "Posted by author" time stamp in this theme. I couldn't find any options to enable or disable this feature in the WP Dashboard, so I think it is a theme limitation.

    Is there a string of code I can add to one of the existing files in this theme to make it display the author of the post or do I have to find a new theme in order to accomplish this? Thanks.

  2. MichaelH
    Posted 8 years ago #

    Use the template tag, the_author for that purpose. Typically, that goes in your theme's index.php file.

  3. jedimacfan
    Posted 8 years ago #

    Thank for the fast reply. Where do I post this code parameter and on which file in the WordPress theme?

  4. jedimacfan
    Posted 8 years ago #

    Oh, sorry, I misread your reply. Currently, my index.php is:

    <?php get_header(); ?>
        <div id="content">
    	<?php if (have_posts()) : ?>
    		<?php while (have_posts()) : the_post(); ?>
            <div class="post" id="post-<?php the_ID(); ?>">
    		  <div class="date"><span><?php the_time('M') ?></span> <?php the_time('d') ?></div>
    		  <div class="title">
              <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
              <div class="postdata"><SPAN class="category"><?php the_category(', ') ?></SPAN> <span class="comments"><?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></span></div>
              <div class="entry">
                <?php the_content('Continue reading &raquo;'); ?>
              </div><!--/entry -->
            </div><!--/post -->
    		<?php endwhile; ?>
            <div class="page-nav"> <span class="previous-entries"><?php next_posts_link('Previous Entries') ?></span> <span class="next-entries"><?php previous_posts_link('Next Entries') ?></span></div><!-- /page nav -->
    	<?php else : ?>
    		<h2>Not Found</h2>
    		<p>Sorry, but you are looking for something that isn't here.</p>
    	<?php endif; ?>
          </div><!--/content -->
          <div id="footer">
    	  <a href="http://www.ndesign-studio.com/resources/wp-themes/">WP Theme</a> &amp; <a href="http://www.ndesign-studio.com/stock-icons/">Icons</a> by <a href="http://www.ndesign-studio.com">N.Design Studio</a>
    	  <span id="mangoorange">, columnized by <a href="http://www.mangoorange.com/">MangoOrange</a></span>
        </div><!--/left-col -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    So how would I enter this correctly? After I do, it gives me an error message.

  5. SniperClops
    Posted 8 years ago #

    This code shows the date and author, not sure how to add the exact time the article was posted but check out this page http://codex.wordpress.org/Template_Tags/the_time

    <?php the_time('F jS, Y') ?> by <?php the_author() ?>

    You can see what mine looks like here http://canuckster.org

  6. SniperClops
    Posted 8 years ago #

    Here is the code that displays the time, date and author of an article.

    <?php the_time('g:i a F jS, Y') ?> by <?php the_author() ?>

Topic Closed

This topic has been closed to new replies.

About this Topic