• Hi Guys

    It looks like the code for displaying the date of post publication is missing from the code of my theme. I know nothing about php and I was wondering if anyone could write the code for me? I’d really appreciate it.
    This is the blog I am talking about http://www.destination-world.net

    Thanks
    Magda

Viewing 5 replies - 1 through 5 (of 5 total)
  • http://codex.wordpress.org/Function_Reference/the_time
    http://codex.wordpress.org/Formatting_Date_and_Time

    for instance, to show the date of the post on the front page, in the line with ‘posted by’; edit index.php and find this line:

    <small><?php _e('Posted by','nattywp'); ?> <span class="author"><?php theme_get_profile() ?></span> <?php _e('in','nattywp'); ?> <?php the_category(' | ');?> - (<?php comments_popup_link(__('0 Comments', 'nattywp'), __('1 Comments', 'nattywp'), __('% Comments', 'nattywp')); ?>)</small> <?php edit_post_link(__('Edit','nattywp'), ' | ', ''); ?>

    change it to something like:

    <small><?php _e('Posted on','nattywp'); ?> <?php the_time('jS M Y'); ?> <?php _e(' by','nattywp'); ?> <span class="author"><?php theme_get_profile() ?></span> <?php _e('in','nattywp'); ?> <?php the_category(' | ');?> - (<?php comments_popup_link(__('0 Comments', 'nattywp'), __('1 Comments', 'nattywp'), __('% Comments', 'nattywp')); ?>)</small> <?php edit_post_link(__('Edit','nattywp'), ' | ', ''); ?>
    Thread Starter magdabis

    (@magdabis)

    Thanks for that

    The line I was able to find looks like that:

    <small><?php _e('Posted by','nattywp'); ?> <span class="author"><?php theme_get_profile() ?></span> <?php _e('in','nattywp'); ?> <?php the_category(' | ');?> <?php edit_post_link(__('Edit','nattywp'), ' | ', ''); ?></small>

    I replaced it with the one provided by you but it doesn’t work 🙁

    Do you have any other idea how to solve the issue?

    Thanks a lot
    Magda

    Thread Starter magdabis

    (@magdabis)

    Actually I’ve noticed that the date now show up when you open the post. But when i look at the home page where the latest posts are, the date doesn’t come up.

    you seem to have edited the line in single.php – well done and fine for single posts.

    have you looked into index.php as i suggested in my first reply, for the front page posts ?

    Thread Starter magdabis

    (@magdabis)

    It works! Thanks so much! 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Code for date is missing from my theme’ is closed to new replies.