Support » Theme: P2 » P2 Theme — remove time from posts

  • I searched the forum and could not find this answer:

    How do I modify the P2 theme so that only the date of a post is displayed, not the time?

    I tried editing the line below in the Main Index Template, index.php, but it did not do the job for me:

    ‘<?php printf( _x( ‘Updates from %s’, ‘Month name’, ‘p2’ ), get_the_time( ‘F, Y’ ) ); ?>’

    Thanks.

    http://wordpress.org/extend/themes/p2/

Viewing 1 replies (of 1 total)
  • Lance Willett

    (@lancewillett)

    Themer

    Look in inc/template-tags.php near line 240, and just remove the time output.

    It looks like:
    return '<abbr title="'.$d( 'Y-m-d\TH:i:s\Z', true).'">'.sprintf( __( '%1$s <em>on</em> %2$s', 'p2' ), $d(get_option( 'time_format' )), $d( get_option( 'date_format' ) ) ).'</abbr>';

    Change it to something like:

    return '<abbr title="' . $d( 'Y-m-d', true ).'">' . $d( get_option( 'date_format' ) ) . '</abbr>';

Viewing 1 replies (of 1 total)
  • The topic ‘P2 Theme — remove time from posts’ is closed to new replies.