Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3953334
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:57:45+00:00 2026-05-20T01:57:45+00:00

Hey there everyone. I have recently begun tweaking the new default wp theme, twenty

  • 0

Hey there everyone. I have recently begun tweaking the new default wp theme, twenty ten. I was working on changing the way the post date and time is displayed when I realized that the loop() function calls for twentyten_posted_on(); where said info is to be displayed. So I eventually found said function inside functions.php. So far so good. Here’s what it looks 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 thing I really care about is what goes inside <span class="entry-date">, which unfortunately in this case is this weird looking character combo: %3$s. This leads me here to ask you knowledgeable fellows how the hell do I break that single var or whatever that is into the actual ‘day’, ‘month’ and ‘year’ pieces so that I may have something like this:

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

I need to be able to do the above so that I can appropriately format my date info and have the site look just the way I want it to.

For good references:

  • Here is the static html + css page:
    http://scninja.com
  • Here is the test page where I’m
    transforming the static into a fully
    functioning wordpress site:
    http://test.scninja.com

Thanks in advance
G.Campos

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T01:57:46+00:00Added an answer on May 20, 2026 at 1:57 am

    The “%3$s” is notation that’s used inside the sprintf. “%3” means use the third variable argument (get_the_date()) as a string ($s).

    So you could break apart that original span into three divs by changing the twentyten_posted_on function like 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 could go into the get_the_date function and change it to return the date as the 3 divs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey everyone! Im pretty new to Android and I have a webView under 2
hey there everyone. so, have a c# windows form that uses crystal reports and
Hey everyone, I'm working on an application and I'm having difficulty with the new
Hey there, I'm sort of new to Objective-C, and well, programming in general. I
Hey there, I'm a designer thats really new to programming with xcode or Objective-C
hey there, i have a div that expands when the page is loaded, now
Hey there, new to AJAX, JS.. Im trying to add to a Javascript/Ajax search
Hey everyone, I made sure there wasn't a similar discussion before posting but forgive
Hey everyone, I am trying to figure out a way to query my mysql
Background Hey everyone! I'm new to using R, and became interested in using it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.