title: Setting a Custom SEO Title Using Yoast Wordpress SEO API
body: <p>I've just installed this plugin on my site and it means that my custom titles that were previously set no longer work.  Here's the link to the brief Wordpress SEO API doc: [http://yoast.com/wordpress/seo/api-docs/]</p>
  
  <p>Previously, I did this:</p>
  
  <pre><code>$pagetitle = '' . $design['name'] . ' | Free Design from My Site';
  </code></pre>
  
  <p>I have a custom URL rewrite that takes a WP page /design/ and appends the design name to /design/design-name so now I've installed WP SEO, the page title is whatever the title of /design/ is and isn't specific.</p>
  
  <p>According to the docs in the link above, I tried this:</p>
  
  <pre><code>function wpseo_design_detail_title($pagetitle) {
  $pagetitle = $design['name'] . ' | Free Web Template from My Site';
  }
  add_filter( 'wpseo_title', 'wpseo_design_detail_title' );
  </code></pre>
  
  <p>That does remove the previous /design/ title but instead it just has the sites URL (i.e. the page title is blank).</p>
  
  <p>I'm probably missing something really simple, right?</p>