ThemeShaper Forums » Thematic

SEO Title Tag Plugin and Thesis

(4 posts)
  • Started 4 years ago by hawaiifi
  • Latest reply from Chris
  • This topic is not resolved

Tags:

  1. hawaiifi
    Member

    The SEO Title Tag plugin is something I can't live without. Is it possible to integrate this with Thesis?

    To make the plugin work, the author says you need to place something like this between the title tag in the header:

    <?php if (function_exists('seo_title_tag')) { seo_title_tag(); } else { bloginfo('name'); wp_title();} ?>

    So, in the function.php file here's what I've done:


    function childtheme_doctitle() {
    if (function_exists('seo_title_tag')) { $my_elements = seo_title_tag(); } else { $my_elements = bloginfo('name'); wp_title();}
    return $my_elements;
    }
    add_filter('thematic_doctitle', 'childtheme_doctitle');

    But for some reason, the title text appears outside of the title tags, like this:

    This is the title text <title></title>

    The same thing happens when I use bloginfo('name') instead of get_bloginfo('name'). What am I missing?

    Posted 4 years ago #
  2. Check the official guide here, I think it's self-explanable.

    Posted 4 years ago #
  3. hawaiifi
    Member

    Thanks Gargon. I read that page thoroughly, and from what I can see, I'm doing it correctly. Here is my code:

    function childtheme_doctitle() {
    if (function_exists('seo_title_tag')) { $my_elements = seo_title_tag(); } else { $my_elements = bloginfo('name'); wp_title();}
    return $my_elements;
    }
    add_filter('thematic_doctitle', 'childtheme_doctitle');

    That should work, shouldn't it? But for some reason, the "title text" shows up outside the "title tag" like this:

    This is the title text <title></title>
    Posted 4 years ago #
  4. :-)

    I can only guess what you're trying to do with the last part of your code.

    First .. bloginfo() will echo the content .. so you should use get_bloginfo() instead.
    Second .. wp_title() will echo the content .. so you should use wp_title('', false) instead.

    Think it should read:

    $my_elements = get_bloginfo('name') . ' ' . wp_title('', false);

    Chris

    Posted 4 years ago #

RSS feed for this topic

Reply

You must log in to post.