• Resolved Mugsy

    (@mugsy)


    (Pardon me if this isn’t the right place for this, but it involves editing the code.)

    My blog posts don’t display the date they were published on. Is there a code I can insert in my CSS/html to automatically display the publication date? Right now, the only way to know the date of a post is to look at its URL.

    I created an html “template” that I reuse with every new post. And while I could manually insert the publication date, it would look much better if there was a way to automatically display a post’s publication date just below the Title.

    I can edit the site’s code (I edited the theme extensively) to include the publication date beneath each post title if I knew what that code/command was (if there even is one.)

    Thx.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator t-p

    (@t-p)

    – Your currently used theme is not in the ww.wp.xz.cn/themes/ directory:
    https://ww.wp.xz.cn/themes/search/emerald-stretch/
    – If this was a custom theme, you may have to go back to your developer team and ask them to make the necessary change(s) to the theme.
    – For pro or commercial product support please contact the author directly on their site.
    – As the author is aware, commercial products are not supported in these forums. As you are their customer I am sure they will have no problem supporting you there.

    Thread Starter Mugsy

    (@mugsy)

    The original theme was downloaded (for free) from the ww.wp.xz.cn themes page nearly a decade ago and has been modified extensively since then by me.

    All I request is information regarding a possible code for “Publication Date”.

    • This reply was modified 8 years, 7 months ago by Mugsy.
    Moderator bcworkz

    (@bcworkz)

    You need to modify the template responsible for output. The function you want is the_date(). As long as it’s used within a standard loop, it will output the current post’s published date. Just be sure it’s not only in the loop, but also within a <?php ?> code block.

    Thread Starter Mugsy

    (@mugsy)

    Fantastic! Works like a charm.

    I only had to edit the “single.php” & “index.php” files to insert the “the_date()” code below “the_title()”. Looks great (which you can check out at my link.)

    Thx.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Is there a code/setting to insert post publication date?’ is closed to new replies.