Support » Themes and Templates » Fatal error: Call to undefined function twentyten_posted_on()

  • Hello, this is my first post on here and my first website using wordpress.
    I am having difficulties with what seems to be posts and/or catagories. It seems that when I upgraded from 3.0 beta to 3.0 I got this message on my “news” page.
    Fatal error: Call to undefined function twentyten_posted_on() in /home/blah/blah/cms/wp-content/themes/twentyten/loop.php on line 128.
    I can submit posts via admin but it refuses to display them. I have tried a manual re install to no avail and I have searched Google and here but found no answers. If anyone can help or has had a similar issue that they managed to fix I would be thankful of the help.

Viewing 1 replies (of 1 total)
  • You are receiving this error, since your theme is calling the “twentyten_posted_on” function that should be located in the “functions.php” file that is located in your theme directory.

    It looks like you have modified the default Twenty Ten theme located in the “twentyten” directory under “wp-content/themes” to create your theme instead of creating a totally new theme and theme directory.

    I would recommend looking at the “functions.php” file under the “wp-content/themes/twentyten” directory and make sure it has the following code somewhere in it:

    if ( ! function_exists( 'twentyten_posted_on' ) ) :
     * Prints HTML with meta information for the current post—date/time and author.
     * @since Twenty Ten 1.0
    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>',
    			esc_attr( get_the_time() ),
    		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() ),

    If it doesn’t have the above code then I would recommend adding it to the bottom of the file.

    Another option would be to download WordPress again and extract all the files to your hard drive somewhere. Then located the “functions.php” file in the “twentyten” directory and copy and replace the current “functions.php” file in your theme directory.

    NOTE: Make a backup of all your files before making any of the changes mentioned above, so if you mess something up you can go back to the previous version.

    I hope this helps.


Viewing 1 replies (of 1 total)
  • The topic ‘Fatal error: Call to undefined function twentyten_posted_on()’ is closed to new replies.