• Resolved cuthza

    (@cuthza)


    Instead of categories, I want the author’s name to appear on the main page.

    So it will just be ‘Author Date’.

    How can I do this?

    I have a child theme.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi cuthza. Depending on which blog post layout you’re using, and whether you want to change the featured posts, you would copy content.php, content-standard.php or content-featured.php to your child theme. Then find this section:

    <div class="post-meta group">
        <p class="post-category"><?php the_category(' / '); ?></p>
        <?php get_template_part('parts/post-list-author-date'); ?>
    </div><!--/.post-meta-->

    and change it to this, making the category line a comment (just in case you want it later) and adding the author link line:

    <div class="post-meta group">
        <!-- <p class="post-category"><?php the_category(' / '); ?></p> -->
        <span class="fn"><?php the_author_posts_link(); ?></span>
        <?php get_template_part('parts/post-list-author-date'); ?>
    </div><!--/.post-meta-->

    Then add this in you child theme style.css file:

    .post-meta .fn{
        float: left;
        margin-right: 10px;
    }
    Thread Starter cuthza

    (@cuthza)

    You are a star! Thank you this worked perfectly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Post author on main page’ is closed to new replies.