Title: get_title() in plugin
Last modified: August 19, 2016

---

# get_title() in plugin

 *  [chaaban](https://wordpress.org/support/users/chaaban/)
 * (@chaaban)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/get_title-in-plugin/)
 * Hello ,
 * i’m working on a plugin to get the first word of the title
 * i tried : get_title() but that doesnt work since i cant assignt the value to 
   a variable , it will only echo .
 * i tried the add_filter but that will mess the title which i dont want .
 * any idea ?
 * basicaly i need both the content and the title
 * its working fine for the content since i’m editing it on the fly but i dont want
   to edit the title and i wans to use the title …
 * Thanks

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

 *  Thread Starter [chaaban](https://wordpress.org/support/users/chaaban/)
 * (@chaaban)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/get_title-in-plugin/#post-772150)
 * any help ?
 *  [haochi](https://wordpress.org/support/users/haochi/)
 * (@haochi)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/get_title-in-plugin/#post-772154)
 * Read the doc, it’s there: [http://codex.wordpress.org/Template_Tags/the_title](http://codex.wordpress.org/Template_Tags/the_title)
 * `<?php $post_title = the_title("", "", false); ?>`
 * Also see: [the_title_attribute()](http://codex.wordpress.org/Template_Tags/the_title_attribute)

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

The topic ‘get_title() in plugin’ is closed to new replies.

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [haochi](https://wordpress.org/support/users/haochi/)
 * Last activity: [17 years, 11 months ago](https://wordpress.org/support/topic/get_title-in-plugin/#post-772154)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
