WordPress.org

Ready to get started?Download WordPress

Forums

Expound
change "2 days ago" to real date and show number of comments (5 posts)

  1. stuudio
    Member
    Posted 4 months ago #

    I like to make few changes:
    1) change "2 days ago" type of "date" to a real date

    2) and show number of comments for the article in the front page.

    any advice is welcome.

  2. stuudio
    Member
    Posted 4 months ago #

    2) and show number of comments for the article in the front page.

    Number of comments was really easy.

    <?php comments_number( 'no responses', 'one response', '% responses' ); ?>.

    must be added to content.php and featured-content.php

    1) change "2 days ago" type of "date" to a real date

    looks more complicated

  3. hdsilvermith
    Member
    Posted 3 months ago #

    I have the same question, particularly with respect to the date
    -- and I probably need more handholding, as I am not Ms. Coder!

    Thanks.

  4. esmi
    Forum Moderator
    Posted 3 months ago #

    @hdsilvermith: If you require assistance then, as per the Forum Welcome, please post your own topic.

  5. LinuxPanda
    Member
    Posted 3 months ago #

    You can do that by by editing the template-tags.php in the inc directory.

    Find: (line 134)
    sprintf( '<a class="entry-date" href="%s">%s</a>', esc_url( get_permalink() ), $output_time )

    Replace:
    sprintf( '<a class="entry-date" href="%s">%s</a>', esc_url( get_permalink() ), $regular_time )

    Find: (line 209)
    sprintf( '<a class="entry-date" href="%s">%s</a>', esc_url( get_permalink() ), $output_time ),

    Replace:
    sprintf( '<a class="entry-date" href="%s">%s</a>', esc_url( get_permalink() ), $regular_time ),

Reply

You must log in to post.

About this Theme

About this Topic