WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to display the date without a trailing comma? (6 posts)

  1. corona79
    Member
    Posted 4 years ago #

    I don't want the time to display on posts and was able to "blank it out" in Settings - General - Time Format. Now the date displays with a trailing comma, e.g., "October 5, 2009,". Is there a way to get rid of that extraneous comman?

  2. alism
    Member
    Posted 4 years ago #

    What does your custom setting say on that Settings > General > Time Format page? Is there an extra comma there to just remove, ie: "F j, Y,"?

  3. corona79
    Member
    Posted 4 years ago #

    The date format is October 5, 2009
    The time format is Custom: <blank> - which I why I don't understand where the comma comes from.

  4. alism
    Member
    Posted 4 years ago #

    Sorry, I meant Date Format. Is there anything in the custom box for that?

  5. corona79
    Member
    Posted 4 years ago #

    It shouldn't matter, because the Custom option is not selected for Date Format, but it's basically what produces October 5, 2009, that is, F j, Y

  6. alism
    Member
    Posted 4 years ago #

    Ahh, ok. Just checking.

    You'll need to have a look through your theme files then. Try your index.php, page.php and single.php files. Sounds like it's been coded in to that.

    Have a look for something along the lines of:

    <?php the_time('F j, Y'); ?>, <?php the_time('g:i a'); ?>

    ...and remove the unwanted comma.

Topic Closed

This topic has been closed to new replies.

About this Topic