Hello everybody. I've lately begun fine-tuning the brand new default wordpress theme, twenty ten. I had been focusing on altering how a publish time and date is displayed after i recognized the loop() function requires twentyten_published_on() where stated info will be displayed. And So I eventually found stated function inside functions.php. To date so great. This is what it appears like:

function twentyten_posted_on() {
printf( __( '<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s', 'twentyten' ),
    'meta-prep meta-prep-author',
    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()
    ),
    sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
        get_author_posts_url( get_the_author_meta( 'ID' ) ),
        sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
        get_the_author()
    )
);

The only real factor I truly worry about is exactly what goes inside <span class="entry-date">, which regrettably within this situation is strange searching character combo: %3$s. This leads me here to request you knowledgeable guys the way the hell will i break that single var or whatever that's in to the actual 'day', 'month' and 'year' pieces to ensure that I might have something similar to this:

<div class="day">$dayvar</div>
<div class="month">$monthvar</div>
<div class="year">$yearvar</div>

I have to have the ability to perform the above to ensure that I'm able to properly format my date info and also have the site look just generate an income would like it to.

Permanently references:

Thanks ahead of time G.Campos

The "%3$s" is notation that's used within the sprintf. "%3" means make use of the third variable argument (get_the_date()) like a string ($s).

Which means you could falter that original span into three divs by altering the twentyten_published_on function such as this:

function twentyten_posted_on() {
printf( __( '<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s', 'twentyten' ),
    'meta-prep meta-prep-author',
    sprintf( '<a href="%1$s" title="%2$s" rel="bookmark">
            <div class="day">%3$s</div>
            <div class="month">%4$s</div>
            <div class="year">%5$s</div>
        </a>',
        get_permalink(),
        esc_attr( get_the_time() ),
        date("d", strtotime(get_the_date())), 
        date("m", strtotime(get_the_date())), 
        date("Y", strtotime(get_the_date())), 
    ),
    sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
        get_author_posts_url( get_the_author_meta( 'ID' ) ),
        sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
        get_the_author()
    )
);

Or you might enter in the get_the_date function and alter it to come back the date because the 3 divs.