WordPress.org

Ready to get started?Download WordPress

Forums

Show Date in Posts (2 posts)

  1. tarjei
    Member
    Posted 5 years ago #

    I am rather new to WordPress, so forgive my stupidity!

    My website at http://sjakkselskapet.no/wordpress/ uses the IndoMagz Theme.

    My template does not show the date in the post in the excerpt in the index site or in the recent post listing. Here is some of the code in single.php:


    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    <h1>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></h1>

    How can I get it to print the date of the post next to the heading of the post?

    Also, I would like to show the date in the Recent Posts Widget, but I can not find the code for this in sidebar.php or any other file. What code do I need, and where to add it?

    I got the Customizable Post Listings Plugin, but could not get it to work as it should.

  2. MichaelH
    Member
    Posted 5 years ago #

    Change this:

    <h1>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></h1>

    to

    <h1>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?> <?php the_time('F jS, Y') ?></h1>

Topic Closed

This topic has been closed to new replies.

About this Topic