• Hi
    I am actually using WordPress 3.0.3 with a Twenten theme
    I want to numerate comments for each posts and have the post time been displayed and not only the date in posts.

    i supppose had to edit twentyten_posted_on() and twentyten_comment() functions but i don’t know how.

    Can someone help me?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The date time is set up in Settings in admin I believe

    I don’t see any admin interface for this.

    The way I’d do it is

    1. First, set up a child theme for your modified version of TwentyTen.

    2. Copy the twentyten_posted_on() function from the twentyten/functions.php to a new functions.php in your child theme.

    3. In that function, the date/time posted information is generated here

    sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>',
    			get_permalink(),
    			esc_attr( get_the_time() ),
    			get_the_date()
    ),

    where the time is output as a title attribute on the link (i.e. if you hover over the date, you’ll see the time).

    If you want the time displayed directly, change that first line to, say,

    sprintf( '<a href="%1$s" rel="bookmark"><span class="entry-date">%3$s at %2$s</span></a>',

    Hope that helps and you see how to modify things to get exactly what you want. [See also the examples in the PHP docs.]

    @root: Incorrect!

    You’ll need to edit the twentyten_comment() function in functions.php and change the parameters for get_comment_date in:

    printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' );

    But be warned that your customisations will be over-written the next time you upgrade WordPress or the theme. For this reason, it is recommended that you consider creating a child theme for your customisations.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Twentyten: time in posts and numerate comments’ is closed to new replies.