Title: code added to theme functions.php is affecting dashboard
Last modified: August 22, 2016

---

# code added to theme functions.php is affecting dashboard

 *  [csleh](https://wordpress.org/support/users/csleh/)
 * (@csleh)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/code-added-to-theme-functionsphp-is-affecting-dashboard/)
 * This code added to theme functions to output <span> around first word of title:
 *     ```
       add_filter('the_title', 'span_first_word');
       function span_first_word($title) {
       $words = explode(' ', $title);
       $words[0] = '<span>'.$words[0].'</span>';
       $title = implode(' ', $words);
       return $title;
       }
       ```
   
 * It works great but is also putting the characters <span></span> in the titles
   list in the dashboard (but not in the title on the edit page). Is there a way
   to specify this change is only for the site and not the backend?

The topic ‘code added to theme functions.php is affecting dashboard’ is closed to
new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [csleh](https://wordpress.org/support/users/csleh/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/code-added-to-theme-functionsphp-is-affecting-dashboard/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
