• Hi all, I am working on a child theme of twenty eleven. My site is all in Italian and works fine. I cannot underestand why the date format under the post looks like:

    Posted on *italian date format* by Admin

    my URL is: https://science4fun.org/

    How can I use the italian version of “Posted on” and of “by”?

    Thank

Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter superciccio14

    (@superciccio14)

    Ok, I clicked on on “non case-sensitive” box in Codestyling Localizatio but I didn’t find the untranslated entry “posted on” and “by”.

    Under the post in my WP home page there is a string beginning with “Contrassegnato con”. I tried to search for this entry (scanning translated strings), but ther is no match…It’s too strange…

    There are no theme files, if I create a new file (it_IT), I don’t find entries such: “posted on” and “by”.

    How can I do?

    I guess you will have to change it manually in the code then. Let’s begin with single.php. Open it and search for “Posted on”. When you find it,replace it with “Postato in data” or whatever you wish. Let me know if you managed it. If you make it,i suppose you’ll have to change category.php and archive.php

    Thread Starter superciccio14

    (@superciccio14)

    I opened wp-content/themes/twentyeleven and scanned:

    – single.php
    – category.php
    – archive.php

    but I didn’t find “Posted on”, so I wasn’t be able to replace the string… ??

    What about functions.php ? When you searched you left out the quotes,right?

    Thread Starter superciccio14

    (@superciccio14)

    Yes, it’s right!

    Yeah, Found it! In functions.php:

    if ( ! function_exists( 'twentyeleven_posted_on' ) ) :
    /**
     * Prints HTML with meta information for the current post-date/time and author.
     * Create your own twentyeleven_posted_on to override in a child theme
     *
     * @since Twenty Eleven 1.0
     */
    function twentyeleven_posted_on() {
    	printf( __( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'twentyeleven' ),
    		esc_url( get_permalink() ),
    		esc_attr( get_the_time() ),
    		esc_attr( get_the_date( 'c' ) ),
    		esc_html( get_the_date() ),
    		esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    		esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ),
    		get_the_author()
    	);
    }
    endif;

    Ok, now should I edit then copy this function into the functions.php of my child theme to fix the problem?

    Before doing anything,back up your files so you can restore them if anything goes wrong. While you’re at it,you can change “by” and “View all posts by”

    Thread Starter superciccio14

    (@superciccio14)

    Yesssss it works! Thank you so much!

    Now a question: why I hadn’t be able to replace this strin through Codestyling Localization?

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘Language of date format under post title’ is closed to new replies.