Yoast SEO
[Plugin: WordPress SEO by Yoast] Change Title Template Variables (1 post)

  1. Corey
    Posted 3 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...


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yoast SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic