• Resolved Ceebe

    (@ceebe)


    Hi all,

    I’m using a twenty eleven child theme and would like to edit the ‘Posted on’ (date) text at the top of each posts to ‘Published on’.

    Anyone know how to do so? Can’t sort it out and my attempts resulted in deleted posts (fixed that though).

    Thanx.
    Ceebe

Viewing 10 replies - 1 through 10 (of 10 total)
  • You need to create a new custom version of the twentyeleven_posted_on() function in your child theme’s functions.php.

    copy the function ‘twentyeleven_posted_on()’ from the parent theme’s functions.php into functions.php of the child theme, and change Posted on into Published on

    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" pubdate>%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()
    	);
    }
    Thread Starter Ceebe

    (@ceebe)

    Oh, looks good. I’ll try tomorrow because it is bedtime now (europe).
    Thank ysm, esmi and alchymyth for your prompt replies.

    Thread Starter Ceebe

    (@ceebe)

    Bummer, can’t get it to work. When I upload a copy of the functions.php form parent to child theme, I can not log in to the blog anymore. I’ve read somewhere that functions.php can not be overwritten, and thus I can not change it.

    Any other suggestions on this?

    When I upload a copy of the functions.php form parent to child theme

    No – that’s the wrong approach. You need to start with a blank functions.php file in the child and just add your customised functions to that file.

    Thread Starter Ceebe

    (@ceebe)

    Euh, http://www.knotjebril.nl
    Way to difficult for me.

    Thread Starter Ceebe

    (@ceebe)

    Please esmi, can you remove my post?
    Thought I could edit after a while, but can’t and I do not want the link to become public for to long.

    Thanx!

    It is not the general policy to edit or delete forum posts. When a post is made and people contribute answers to an issue, that then becomes part of the community resource for others to benefit from. Deleting posts removes this added value. In extreme circumstances, the moderation team might be persuaded to remove sensitive information but. generally, your best course of action is not to publish anything that you wouldn’t want to be public. I’m sorry but this is not an extreme case.

    http://codex.wordpress.org/Forum_Welcome#Deleting_.2F_Editing_Posts

    Thread Starter Ceebe

    (@ceebe)

    Hm, understand but don’t like it.
    Would it help if I would put in some spam? 🙂

    Thread Starter Ceebe

    (@ceebe)

    Got it! Yes! Took me hours to figure it out.
    For those who want to know:

    Follow the steps as described above but, add <?php above the code and close with ?> at the end.

    That will make it work. Dont ask me why cause I don’t know anything about codes, css etc.

    Found some more on this here: http://wordpress.org/support/topic/functionsphp-on-twentyten-child-theme-causes-blank-pages-mu-setup

    Have fun and tnx to repliers.
    Ceebe

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Posted on’ is closed to new replies.