WordPress.org

Ready to get started?Download WordPress

Forums

Post Author (7 posts)

  1. bocaz
    Member
    Posted 6 years ago #

    Hi!
    I´m use theme Silver Lexus 1.0a witch I think is very nice but I have one problem. Then I write a post the author of message does not show. I have search the forum and test the php author syntax with no change of result. Then I activate a diffrent theme it works properly. Does anyone have a solution of my problem?

  2. Pinoy.ca
    Member
    Posted 6 years ago #

    Visit http://codex.wordpress.org/Template_Tags/the_author for usage and an example.

  3. bocaz
    Member
    Posted 6 years ago #

    I have allready tryed that, with same result.

  4. Pinoy.ca
    Member
    Posted 6 years ago #

    Do you mean that <?php the_author(); ?> produces nothing, not even an error? the_author() must be put somewhere between while ( have_posts() ) : the_post(); and endwhile;.

  5. bocaz
    Member
    Posted 6 years ago #

    Yes I mean that <?php the_author(); ?>

    I don´t get any error. I put a new line below as below in index.php
    -------------------------------------------------
    <?php while (have_posts()) : the_post(); ?>
    <?php the_author(); ?>

    <div class="post" id="post-<?php the_ID(); ?>">
    -------------------------------------------------

  6. Roy
    Member
    Posted 6 years ago #

    This is what it looks like in my theme (Fluid Blue):
    <div class="postmetadata"><?php the_time('jS F Y') ?> <!-- <?php _e('by') ?> <?php the_author() ?> --></div>

  7. bocaz
    Member
    Posted 6 years ago #

    Allright! I have found the problem. I had plugin wp-cache active and a cache of pages, becourse the pages was cache the change did not apears. When I disable tha cache it work probely. Thanks for you help. =)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.