Title: [Plugin: SEO Ultimate] &#8211; Get title in variable PHP
Last modified: August 19, 2016

---

# [Plugin: SEO Ultimate] – Get title in variable PHP

 *  Resolved [tprod](https://wordpress.org/support/users/tprod/)
 * (@tprod)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/plugin-seo-ultimate-get-title-in-variable-php/)
 * Hi everyone,
 * I use this fantastic SEO plugin but I want to optimize h1 by retrieving title
   of each page in a php variable.
 * How can I do ? Any ideas ?
 * Thanks for your help.
 * Regards

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

 *  Thread Starter [tprod](https://wordpress.org/support/users/tprod/)
 * (@tprod)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-seo-ultimate-get-title-in-variable-php/#post-1577303)
 * In fact you can use a session for that. It’s not the better idea but it works.
 *  Anonymous User 907751
 * (@anonymized-907751)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-seo-ultimate-get-title-in-variable-php/#post-1577304)
 * Have you tried Yoast’s new WordPress SEO plugin? [http://yoast.com/wordpress-seo-public-beta/](http://yoast.com/wordpress-seo-public-beta/)
 *  [John](https://wordpress.org/support/users/johnlamansky/)
 * (@johnlamansky)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-seo-ultimate-get-title-in-variable-php/#post-1577314)
 * [@tprod](https://wordpress.org/support/users/tprod/): This code should work:
 *     ```
       <?php
       global $seo_ultimate;
       $title_tag = $seo_ultimate->modules['titles']->get_title();
       echo "<h1>$title_tag</h1>";
       ?>
       ```
   
 * [@daniel](https://wordpress.org/support/users/daniel/): Neither SEO Ultimate 
   nor Yoast’s plugin offers an automated (i.e. code-free) way to accomplish what
   tprod is asking about. The code I posted is the easiest way to do it with SEO
   Ultimate, and you could probably do something similar with Yoast’s plugin.
 *  Thread Starter [tprod](https://wordpress.org/support/users/tprod/)
 * (@tprod)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-seo-ultimate-get-title-in-variable-php/#post-1577315)
 * Hi John and thanks for your answer. It works like a charm.
    Besides, your update
   resolve several problems.
 * Thanks again.
 * Tprod

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

The topic ‘[Plugin: SEO Ultimate] – Get title in variable PHP’ is closed to new 
replies.

 * 4 replies
 * 3 participants
 * Last reply from: [tprod](https://wordpress.org/support/users/tprod/)
 * Last activity: [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-seo-ultimate-get-title-in-variable-php/#post-1577315)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
