Answers.Body: <p>There is also a nice plugin called <a href="https://github.com/ehousestudio/craft_hacksaw/" rel="nofollow">Hacksaw</a> that gives you a handful of helpers. With this you can do <code>{{ entry.title|hack(words='1') }}</code></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-27T18:01:57.527Z
Answers.LastActivityDate: 2016-10-15T18:10:12.100Z
Answers.LastEditDate: 2016-10-15T18:10:12.100Z
Answers.UserDisplayName: Pautomagi
Answers.Body: <p>Yes, you can do this with Twig alone. Here's how:</p>
  
  <pre><code>{{ entry.title|split(' ')|slice(0, 1)|join }}
  </code></pre>
  
  <p>This series of Twig filters:</p>
  
  <ol>
  <li>Uses <code>split</code> to turn the title into an array, splitting on spaces.</li>
  <li>Passes that array through <code>slice</code> to grab the first item in the array.</li>
  <li>Then uses <code>join</code> to turn the array back into a string for output. The array is now just one item (the first word of the title), but <code>join</code> is needed because Twig doesn't want to treat an array as a string.</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-24T18:55:06.813Z
Answers.LastActivityDate: 2016-10-15T17:15:21.300Z
Answers.LastEditDate: 2016-10-15T17:15:21.300Z
Answers.UserDisplayName: Gavin Anderegg
Body: <p>Is it possible to output only the first word of the title of an entry in a template? If so, how? Thanks!</p>
  
Tags: <templating><titles>
Title: How Can I Output Only the First Word of the Title of an Entry in a Template?
ThreadText: # How Can I Output Only the First Word of the Title of an Entry in a Template?
  
  (Asked by: username_0 on 2016-05-24)
  
  Is it possible to output only the first word of the title of an entry in a template? If so, how? Thanks!
  
  **Tags:** templating, titles
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2016-05-24. Score: 12 | Accepted answer
  
  Yes, you can do this with Twig alone. Here's how:
  
  ```
  {{ entry.title|split(' ')|slice(0, 1)|join }}
  
  ```
  
  This series of Twig filters:
  
  1. Uses `split` to turn the title into an array, splitting on spaces.
  2. Passes that array through `slice` to grab the first item in the array.
  3. Then uses `join` to turn the array back into a string for output. The array is now just one item (the first word of the title), but `join` is needed because Twig doesn't want to treat an array as a string.
  
  
  ---
  
  ### Answer by username_1 on 2016-05-27. Score: 5
  
  There is also a nice plugin called [Hacksaw](https://github.com/ehousestudio/craft_hacksaw/) that gives you a handful of helpers. With this you can do `{{ entry.title|hack(words='1') }}`
  
  
  ---
  
  