• Resolved antherwellen

    (@antherwellen)


    I’m pulling my hair out here. : ( Every time I try a new theme, it’s not displaying the time or date like it shows in the preview of the theme. I have one I’m working on now that’s one of the common themes listed from wordpress. Called Connections. My page is here:

    https://windsorcitywatch.com/

    I know I still need to fix the top there, but why isn’t it showing a time when I make a post, or in any of the old posts when it shows a time in the preview of this theme on wordpress? Other times the theme will be missing the dates.

    I’m just wondering what’s messed up causing this, and how I can fix it? I’ve only just started using wordpress yesterday, so sorry if this is a stupid question. In the Dashboard>Options, I’ve set all the proper info for data and time.

    Any help would be so appreciated. Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • I found no problem.

    Your date and time are showing in both the preview and the full article.

    you need to get into the code for the theme itself.. many times people hard code date / times into it .. e.g. for the default (kubrick) in index.php (“main template” through the admin interface) you will find
    <?php the_time('F jS, Y') ?>

    the F jS, Y is what you set in the options, but if you set it here, it shorts it, so the code is what is used, not the defaults. so if you remove that so it looks like
    <?php the_time() ?>
    then it should follow what you have set in the options panel

    what i use to be able to use what i set in the options panel in place of that is
    <?php the_time(get_settings('date_format')) ?> - <?php the_time() ?>

    (note: the reason I don’t just call it as
    <?php the_date() ?> - <?php the_time() ?>
    is that if you call the_date() it only actually returns the date for the first post each day.. sometimes you want that sometimes you don’t .. in this instance I don’t)

    mind you, you often have to fix this on all the parts of your theme, comments.php, archive.php, page.php, single.php, etc.

    hope this helps.. good luck.

    Thread Starter antherwellen

    (@antherwellen)

    To the person who first commented, I ended up switching to another template, so that’s why the time is showing now.

    To the second person, thank you, I will try to go back to that other template and see if I can get it to work. I’ll try using some of the things you posted here. Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Time for each post not being displayed’ is closed to new replies.