Title: Title attribute missing
Last modified: August 18, 2016

---

# Title attribute missing

 *  [mikedini](https://wordpress.org/support/users/mikedini/)
 * (@mikedini)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/title-attribute-missing/)
 * I no longer get the title attribute when I upload an image to WP2.0. I put descriptive
   text into the “title” field, but all I get is alt=”my descriptive text here.”
   I know that it was working previously, and I don’t believe that I’ve changed 
   anything. Help!
 * [http://www.pistolotto.com](http://www.pistolotto.com)

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

 *  [pratian](https://wordpress.org/support/users/pratian/)
 * (@pratian)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/title-attribute-missing/#post-477275)
 * I have the same problem. WordPress is calling up the title text for the alt text.
   The “title” as entered into the inline image uploader is entered into the MySQL
   database as a post_title, the “description” field enters it a post_content. However,
   in the end the both the title and alt attributes’ text are being called from 
   the post_title.
 * I’m not sure where this glitch is to be found. I need to change it so the description
   is displayed as alt text.
 *  [sketchbunny](https://wordpress.org/support/users/sketchbunny/)
 * (@sketchbunny)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/title-attribute-missing/#post-477549)
 * You have to edit inline-uploading.php (in your wp-admin folder). Go to around
   line 251, and find the line that says
 * <img id=\"image{$ID}\" src=\"$src\" alt=\"{$title}\" $height_width />
 * Change this line to
 * <img id=\"image{$ID}\" src=\"$src\" alt=\"{$descr}\" title=\"{$title}\" $height_width/
   >
 * This should take effect the next time you upload something. Unfortunately, the
   change won’t apply to anything you’ve already uploaded, because the HTML is already
   stored in your database.
 *  [sketchbunny](https://wordpress.org/support/users/sketchbunny/)
 * (@sketchbunny)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/title-attribute-missing/#post-477550)
 * Sorry, please disregard my first post. I actually had to change a lot of other
   things in inline-uploading.php to get it to work properly. Here are all the changes.
 * Line 143:
    `$attachments = $wpdb->get_results("SELECT ID, post_date, post_title,`…
   Add post_content to the list between post_date and post_title.
 * Line 243:
    Find the line `$title = wp_specialchars($image['post_title'], ENT_QUOTES);`
   After this line, add the following line: `$descr = wp_specialchars($image['post_content'],
   ENT_QUOTES);`
 * Around line 247:
    Make this change for the **two** lines that begin with `imga[{
   $ID}]` and with `imgb[{$ID}]`. Replace `alt=\"{$title}\"`, with `alt=\"{$descr}\"
   title=\"{$title}\"` or whatever change you wanted to make.
 * Around line 252:
    Make the same change as above. It should look like `<div id
   ='div{$ID}' class='imagewrap' onclick=\"doPopup({$ID});\"> <img id=\"image{$ID}\"
   src=\"$src\" alt=\"{$descr}\" title=\"{$title}\" $height_width /> </div>
 *  [loauc](https://wordpress.org/support/users/loauc/)
 * (@loauc)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/title-attribute-missing/#post-477551)
 * sketchbunny: I’m applying this patch right now. Thank you for sharing it.
 *  [loauc](https://wordpress.org/support/users/loauc/)
 * (@loauc)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/title-attribute-missing/#post-477552)
 * And yes, it worked fine with WP 2.0.5
 * Thanks again.
 *  [pratian](https://wordpress.org/support/users/pratian/)
 * (@pratian)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/title-attribute-missing/#post-477554)
 * sketchbunny
 * Thanks, that was perfect.
 *  [pratian](https://wordpress.org/support/users/pratian/)
 * (@pratian)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/title-attribute-missing/#post-477564)
 * And now that I’m using 2.1 I’m back to square one. I’ll see if I can make a similar
   tweak to above but if anyone has done this already, please feel free to share.

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

The topic ‘Title attribute missing’ is closed to new replies.

## Tags

 * [attribute](https://wordpress.org/support/topic-tag/attribute/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 4 participants
 * Last reply from: [pratian](https://wordpress.org/support/users/pratian/)
 * Last activity: [19 years, 1 month ago](https://wordpress.org/support/topic/title-attribute-missing/#post-477564)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
