Support » Plugin: Yoast SEO » [Plugin: WordPress SEO by Yoast] Change Title Template Variables

  • Corey

    (@coreyw)


    In the admin when you’re editing page titles, you can use variables like this: %%title%% %%page%% %%sep%% %%sitename%%. It would make things a lot cleaner and easier on the code side to change that instead to :title :page :sep :sitename. Then, when replacing it, you just use strtr:

    $title = strtr($title, array(
        ':title'    => $post_title,
        ':page'     => $page_number,
        ':sep'      => $separator,
        ':sitename' => $sitename,
        // etc...
    ));

    http://wordpress.org/extend/plugins/wordpress-seo/

  • The topic ‘[Plugin: WordPress SEO by Yoast] Change Title Template Variables’ is closed to new replies.