• surefire

    (@surefire)


    How do I make it say Posted on -date- by -whoever- at the top of each new log instead of just saying the date under the log name?

Viewing 13 replies - 1 through 13 (of 13 total)
  • stragen

    (@stragen)

    I was wondering a similar thing, but whenever I try that link I get a 404. I’ve managed to find where the tag is in the file, and got it to display, but I can’t figure out how to get the line to read “posted on [date], by [name]” instead of “[date] [name]”.

    My site is https://www.smileordie.l2p.net/ if that helps, and I’m using a modified version of the default 1.5 theme. Only modified in layout and colours, though.

    Hope you can help me.

    alvy

    (@alvy)

    Edit line 11 in index.php (main template)
    <small><?php the_time('F jS, Y') ?> <!--by <?php the_author() ?> --></small>

    remove the comment tag around by author so it looks like this:
    <small><?php the_time('F jS, Y') ?> by <?php the_author() ?> </small>

    Kafkaesqui

    (@kafkaesqui)

    Uh, when I visit your site I see:

    “Posted on February 27th, 2005 by Chris”

    Isn’t that pretty much what you want? Anyway, you can use:

    Posted on <?php the_time('F j, Y'); ?>, by <?php the_author(); ?>

    Used the_time() to assure it works for each post (the_date() only displays for each new day/date, so two posts in the same day would only show the date on the latest).

    stragen

    (@stragen)

    Yeah, I’ve got it working now, thanks. At first, what I thought would work didn’t, but I suspect it may have been a caching issue with my browser. Bah. Anyhow, thanks again for your help.

    I got this to work on the front page.

    But not if I look at the blog by month or category.

    Any way to add it there, also.

    Moderator James Huff

    (@macmanx)

    You’ll have to do the same in archive.php.

    I can’t get it to work at all. All I have is a blank page for the default 1.5 theme, and it won’t work at all in my own theme, so i have no idea what’s wrong here.

    thanks macmanx, I’ll try that

    But what if you want the Posted by to be at the bottom of the post instead of the top?

    I put <small><?php the_time('l, F jS, Y') ?></small>

    at line 40 of archive.php

    where it originally said <small><?php the_time('l, F jS, Y') ?> — by <?php the_author() ?></small>

    and it worked perfectly — thanks!

    oops, the other way around

    (and that mdash is actually a character entity “& mdash ;” not the character itself)

    So glad I found this thread, it helped me.
    This would be a good GUI feature (including author name).
    If I don’t find a similar request in the feedback section, I’ll suggest it.
    But it’s good to know we can change it by hand.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Posted By…’ is closed to new replies.