WordPress.org

Ready to get started?Download WordPress

Forums

Changing date (9 posts)

  1. Yoggi
    Member
    Posted 7 years ago #

    I´m the guy behind the swedish http://www.demalt.info
    I would like to know how to get rid of the "th" after my date. Today it says "februari 28th, 2007" under one of my posts. How do I take away the th after the number? I would be hapy with just the number.

    Cheers
    /Giorgio

  2. ghanshyamgadhiya
    Member
    Posted 7 years ago #

    in php date() function

    S = English ordinal suffix for the day of the month, 2 characters st, nd, rd or th.

    so find that date('s')(here function is
    => the_time('F jS, Y'); ) function and remove s from it.
    :-}

  3. Yoggi
    Member
    Posted 7 years ago #

    ...excuse me for this extremly stupid question but where do I find this? On the wp-content/themes/default/style.css or do I need to download a plugin of some sort?

    :(

    /Giorgio

  4. ghanshyamgadhiya
    Member
    Posted 7 years ago #

    files are in wp-content/themes/default/

    index.php,
    single.php

  5. makemead
    Member
    Posted 7 years ago #

    Check your index.php (the one in wp-content/themes/*template-name*/index.php, not the one in root) for something like this:<?php the_time('F jS, Y') ?> or <?php the_date('F jS, Y') ?>
    Take out the capital S.

    Or you can use <?php the_date() ?> and it will be settable by using the Admin panel "Options" -> "General" -> "Date and time" section -> "Default date format" form field

  6. Yoggi
    Member
    Posted 7 years ago #

    I´ll check it up! Thanks for all your tips! "filesharing & co-coding is caring"

    :)

  7. Yoggi
    Member
    Posted 7 years ago #

    I don´t know what to do really. The only thing that is written in my index php file is:

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./wp-blog-header.php');
    ?>

  8. ghanshyamgadhiya
    Member
    Posted 7 years ago #

    the simple thing is search this text the_time('F jS, Y') in all your file and just remove s.

  9. Yoggi
    Member
    Posted 7 years ago #

    I fixed it! Big hug!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.