• Resolved tprod

    (@tprod)


    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

    (@tprod)

    In fact you can use a session for that. It’s not the better idea but it works.

    Anonymous User 907751

    (@anonymized-907751)

    Have you tried Yoast’s new WordPress SEO plugin? https://yoast.com/wordpress-seo-public-beta/

    John

    (@johnlamansky)

    @tprod: This code should work:

    <?php
    global $seo_ultimate;
    $title_tag = $seo_ultimate->modules['titles']->get_title();
    echo "<h1>$title_tag</h1>";
    ?>

    @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

    (@tprod)

    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.