WordPress.org

Ready to get started?Download WordPress

Forums

Posted By Code (author not displayed) (5 posts)

  1. Mithrustt
    Member
    Posted 6 years ago #

    When I go to make a post, under the title it's supposed to say:

    Date, Year by Author in Category

    However, for some reason, all it says is:

    Date, Year by in Category

    From what I can see, this is the code that determines what it says. I was just wondering if someone could tell me what I have to add so the author shows up too.

    <h3><img src="<?php bloginfo('stylesheet_directory'); ?>/images/timeicon.gif" alt="" /> <?php the_time('F jS, Y') ?> by <img src="<?php bloginfo('stylesheet_directory'); ?>/images/author.gif" alt="" />
    <?php the_author() ?> in <?php the_category(', ') ?>

  2. MichaelH
    Member
    Posted 6 years ago #

    Aren't you missing some semicolons (;) in some of the PHP tags.

    <h3><img src="<?php bloginfo('stylesheet_directory'); ?>/images/timeicon.gif" alt="" /> <?php the_time('F jS, Y'); ?> by <img src="<?php bloginfo('stylesheet_directory'); ?>/images/author.gif" alt="" />
    <?php the_author(); ?> in <?php the_category(', '); ?>
  3. Mithrustt
    Member
    Posted 6 years ago #

    I added them in, but that didn't seem to fix it.

  4. MichaelH
    Member
    Posted 6 years ago #

    Interesting--here's a similar problem from last week that might shed some light:
    http://wordpress.org/support/topic/119545?replies=11

  5. Mithrustt
    Member
    Posted 6 years ago #

    I looked through that one and realised I didn't have the author part of the code. I added that in and cleaned it up a bit, but it still hasn't changed. Here's what I have now:

    <h3><?php the_time('F jS, Y'); ?> by <?php the_author(); ?> in <?php the_category(', '); ?> 
    
    <strong>&nbsp;</strong> 
    
    <?php edit_post_link('Edit','','<strong></strong>'); ?>  </h3>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags