WordPress.org

Ready to get started?Download WordPress

Forums

Quark
[resolved] changing date display in the post (6 posts)

  1. bcleverc_marta
    Member
    Posted 9 months ago #

    Hi,

    I can't find where to edit date display on the post header (remove it or change into last modification date). I didn't find it in single.php and WP Last Modified is not working. Please help :)

  2. Noone Here
    Member
    Posted 9 months ago #

    Hello!

    I am not sure what you are referring to, but I would like to help. In most situations, the date displayed which is set in the post editor. There you can click on edit, and change the date. I wordpress shows that date.
    Here is a screenshot: http://d.pr/i/mw9F

    But your theme most likely sorts the posts in order of the publication time, so don't be surprised if the post order has changed.

    If you would like to change the date format how the post publication dates are appearing, you can set it easily inside WordPress Dashboard at Settings->General, here: http://d.pr/i/zOJT

    Greetings,
    Balint

  3. ahortin
    Member
    Theme Author

    Posted 9 months ago #

    There's a function in functions.php called quark_posted_on() that formats the post meta, including things like the post author and post date.

  4. bcleverc_marta
    Member
    Posted 9 months ago #

    Thanks a lot for help. I meant changing default settings of display, but I see it wasn't clear. I'm experimenting with quark_posted_on() - hope I will figure it out :)

  5. ahortin
    Member
    Theme Author

    Posted 9 months ago #

    No probs :-)

  6. bcleverc_marta
    Member
    Posted 8 months ago #

    I changed the default display in the post header 'posted on' into last modification date and it is working on my blog, so I can share the solution:

    1) in functions.php file:
    if ( ! function_exists( 'quark_posted_on' ) ) {
    function quark_posted_on() {

    change into:
    if ( ! function_exists( 'quark_modified_on' ) ) {
    function quark_modified_on() {

    2) in content.php file:
    <?php quark_posted_on(); ?>

    change into:
    <?php quark_modified_on(); ?>

    and:
    esc_attr( get_the_date( 'c' ) ),
    esc_html( get_the_date() )

    change into:
    esc_attr( get_the_modified_date( 'c' ) ),
    esc_html( get_the_modified_date() )

Reply

You must log in to post.

About this Theme

About this Topic