WordPress.org

Ready to get started?Download WordPress

Forums

Expound
[resolved] Add author to main page content? (5 posts)

  1. screensnark
    Member
    Posted 10 months ago #

    Any way to add the author and time under the featured content title on the front page?

  2. Konstantin Kovshenin
    Member
    Theme Author

    Posted 10 months ago #

    Hey there, sure! You can create a child theme and override the content.php template file and use functions like the_time and the_author to display the date and author on the home page and archives.

    Hope that helps!

  3. kallekn
    Member
    Posted 8 months ago #

    Could you be a bit more specific on that? Exactly where in content.php should I add the_time in order to have it display below the featured content title, and below the secondary featured content title? But not under the other titles, as they already have the date under the excerpt.

    Or better yet, how would I add the date under every title on the front page and remove it from under the excerpt where applicable?

    Also, I still haven't been able to figure out how to remove the blank space under the titles on the front page.

    http://www.glasnost.se

  4. kallekn
    Member
    Posted 8 months ago #

    On the same note, how do I change the time display format under the title of a single post from relative to absolute? I other words, exact date instead of "...ago"?

  5. Konstantin Kovshenin
    Member
    Theme Author

    Posted 7 months ago #

    Or better yet, how would I add the date under every title on the front page and remove it from under the excerpt where applicable?

    If you'd like to target specific pages, what you need are conditional tags, for example:

    if ( is_front_page() ) {
        the_time();
    }

    Will output the time only on the front page. If you'd like to specify a format, you should use the format argument supported by the function: http://codex.wordpress.org/Function_Reference/the_time

    Hope that helps!

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.