WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
Change Title Template Variables (1 post)

  1. Corey
    Member
    Posted 2 years ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic