Title: wp_title() output as variable
Last modified: August 18, 2016

---

# wp_title() output as variable

 *  [theplayers](https://wordpress.org/support/users/theplayers/)
 * (@theplayers)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/wp_title-output-as-variable/)
 * I would like to output the result of wp_title() to a string variable. Which file
   and function I have to modified?

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

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/wp_title-output-as-variable/#post-211160)
 * Just use it in this manner:
 * `$my_title = wp_title('', false);`
 * The second parameter (display) when set to false returns the value of the function.
 *  Thread Starter [theplayers](https://wordpress.org/support/users/theplayers/)
 * (@theplayers)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/wp_title-output-as-variable/#post-211162)
 * Thanks for your guide. It works for me.
    I use the variable with BBClone for 
   my blog.

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

The topic ‘wp_title() output as variable’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [theplayers](https://wordpress.org/support/users/theplayers/)
 * Last activity: [20 years, 10 months ago](https://wordpress.org/support/topic/wp_title-output-as-variable/#post-211162)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
