Suits theme: add author and date to top of post (3 posts)

  1. avishakeit
    Posted 2 years ago #


    I am running Suits theme, and I noticed that the date and author appears at footer of my posts; I'm having trouble moving it to the header.

    My style.css sheet has this in the footer:
    .single-author .entry-meta .by-author,
    .sticky .entry-meta .on-date {
    display: none

    Even though the display is none, the title still shows... i have no idea how this works. I moved this code to the header and took it out of the footer and it made no change.

    I also tried following the advice in this thread: https://wordpress.org/support/topic/add-date-and-authors-name?replies=12

    I added that code to the index.php file, and it showed the date and author at the top of the page, but not when I clicked on the individual post.

    I have no coding experience so any help is appreciated.

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    As your theme is only available via wordpress.com, you will need to wait for one of their support people to deal with your questions. To that end, I've have tagged this topic for their attention and, hopefully, someone will be along shortly.

  3. I noticed that the date and author appears at footer of my posts

    That info is called the "entry meta" and is included in the post through this function in content.php:

    <?php suits_entry_meta(); ?>

    To move it somewhere else, the first thing you'll need to do is set up a child theme, so your tweaks won't be overwritten when updating the theme. Here are some guides in case you haven't made one before:


    Once your child theme is set up, copy the file content.php and place it in your child theme folder.

    Now move the line with the function I mentioned above from line 47, somewhere further up, say to line 26, just below the title.

    Lines 25-26 should now look like this:

    <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
    <?php suits_entry_meta(); ?>

    I just tested this in a child theme on my end and it works. Let me know how it goes.

Topic Closed

This topic has been closed to new replies.

About this Topic