Title: Pass the_title() into variable
Last modified: August 18, 2016

---

# Pass the_title() into variable

 *  Resolved [vaprak](https://wordpress.org/support/users/vaprak/)
 * (@vaprak)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/pass-the_title-into-variable/)
 * Does anyone know of a way to get the value of the_title() into a variable.
 * I’d like to do some conditional formatting based on whether different words appear
   in the post title.

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

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years, 5 months ago](https://wordpress.org/support/topic/pass-the_title-into-variable/#post-561059)
 * `$variable = the_title('','',false);`
 *  Thread Starter [vaprak](https://wordpress.org/support/users/vaprak/)
 * (@vaprak)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/pass-the_title-into-variable/#post-561104)
 * Thank you, sir.
 * Works perfectly.

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

 The topic ‘Pass the_title() into variable’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [vaprak](https://wordpress.org/support/users/vaprak/)
 * Last activity: [19 years, 5 months ago](https://wordpress.org/support/topic/pass-the_title-into-variable/#post-561104)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
