Title: what is a T_string?
Last modified: August 20, 2016

---

# what is a T_string?

 *  [dianabyron](https://wordpress.org/support/users/diannetrussell/)
 * (@diannetrussell)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/what-is-a-t_string/)
 * On Twenty Twelve theme. Got a child theme. Trying to change something in functions.
   php, and have been on forums getting help, but none of the code people have given
   works – I always get a parse error about “unexpected T_string” on line whatever,
   even when my helpers have checked their code and say it’s right. I’ve been trawling
   through the code schools and wordpress codex and the forums just trying to find
   out SIMPLY what is a T_string?
 * I can’t find and correct an unexpected T_string if I don’t even know what it 
   is.
    Can someone please explain what it is, very simply?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/what-is-a-t_string/#post-3568390)
 * Try:
    – switching to the default theme by renaming your current theme’s folder
   inside wp-content/themes and adding “-old” to the end of the folder name using
   FTP or whatever file management application your host provides. – [resetting the plugins folder](http://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plugins_when_not_able_to_access_the_administrative_menus.3F)
   by FTP or phpMyAdmin.
 *  Thread Starter [dianabyron](https://wordpress.org/support/users/diannetrussell/)
 * (@diannetrussell)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/what-is-a-t_string/#post-3568409)
 * I don’t understand why you are saying that.
    I deleted the faulty functions.php
   file out of my child theme and the site is fine, but I just can’t code the thing
   that I want to do. What I want to do is get my homepage post excerpts to be longer
   than the current setting before they go to […] Read More. This is the code I 
   was given for the child functions.php, but it keeps giving parse errors – UNEXPECTED
   T_STRING ON LINE 13:
 *     ```
       1.	<?php
       	2.	function twentytwelvechild_custom_excerpt_length( $length ) {
       	3.		return 100;
       	4.	}
       	5.	add_filter( 'excerpt_length', 'twentytwelvechild_custom_excerpt_length', 100 );
       	6.
       	7.	function twentytwelvechild_new_excerpt_more($more) {
       	8.	       global $post;
       	9.		return ' <a href="'. get_permalink($post->ID) . '">Read the rest...</a>';
       	10.	}
       	11.	add_filter('excerpt_more', 'twentytwelvechild_new_excerpt_more');
       	12.
       	13.	?>
       ```
   
 * And why would I want to reset the plugins folder?
 *  [wprock](https://wordpress.org/support/users/wprock/)
 * (@wprock)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/what-is-a-t_string/#post-3568411)
 * looks like code is ok
 *  Thread Starter [dianabyron](https://wordpress.org/support/users/diannetrussell/)
 * (@diannetrussell)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/what-is-a-t_string/#post-3568413)
 * Is the code OK as is, I mean, this is the entire functions.php content in the
   child theme. Does it need anything else in order to work in conjunction with 
   the parent theme?
 *  [wprock](https://wordpress.org/support/users/wprock/)
 * (@wprock)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/what-is-a-t_string/#post-3568414)
 * Try this one
 *     ```
       <?php
       function twentytwelvechild_custom_excerpt_length( $length ) {
         return 100;
       }
       add_filter( 'excerpt_length', 'twentytwelvechild_custom_excerpt_length');
   
       function twentytwelvechild_new_excerpt_more($more) {
        global $post;
        return ' <a href="'. get_permalink($post->ID) . '">Read the rest...</a>';
       }
   
       add_filter('excerpt_more', 'twentytwelvechild_new_excerpt_more');
       ?>
       ```
   
 *  Thread Starter [dianabyron](https://wordpress.org/support/users/diannetrussell/)
 * (@diannetrussell)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/what-is-a-t_string/#post-3568417)
 * Tried it.
    Parse error: syntax error, unexpected T_STRING in /home/diann/public_html/
   wp-content/themes/twentytwelve-child/functions.php on line 13
 * No-one can see anything wrong, but it just doesn’t work. I’m back to just the
   parent functions.php for now. But I really do want to make the post excerpts 
   longer!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘what is a T_string?’ is closed to new replies.

## Tags

 * [parse-error](https://wordpress.org/support/topic-tag/parse-error/)
 * [T_STRING](https://wordpress.org/support/topic-tag/t_string/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 3 participants
 * Last reply from: [dianabyron](https://wordpress.org/support/users/diannetrussell/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/what-is-a-t_string/#post-3568417)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
