• thehilliergroup

    (@thehilliergroup)


    I am using the default theme for wordpress 2.0. Under options general I have enter the Weblog title “Seattle Real Estate Journal” which then shows up as the title in the header. The problem is it also shows up in the browser as the title for the page.

    However, I would like the page title in the browser to read “Seattle Real Estate-Seattle Washington Real Estate” in order to optimize for the search engines.

    Any thoughts? I am a newbie to wordpress.

Viewing 14 replies - 1 through 14 (of 14 total)
  • your header.php file probably has something like this:
    <title><?php bloginfo('name'); ?><?php wp_title(); ?></title>

    Change the info between the title tags to what you want it to say.

    but truthfully, I don’t think that’s going to make a difference to search engines as much as what’s in your content.

    Thread Starter thehilliergroup

    (@thehilliergroup)

    When you say change the info between the title tags do you mean like this:

    <title><?php bloginfo (‘name’); ?><?php wp_title (‘Seattle Real Estate-Seattle Washington Real Estate’); ? ></title>

    or like this:

    <title><?php bloginfo (‘Seattle Real Estate-Seattle Washington Real Estate’); ?><?php wp_title (‘name’); ? ></title>

    I was only skimming through posts when I came to this one. I won’t presume to know what he meant but I will guess he possibly meant using a static title such as:

    <title>Seattle Real Estate-Seattle Washington Real Estate</title>

    correct MAK. the bloginfo is a template tag. adding anything other than the built in parameters would break the page.

    Thread Starter thehilliergroup

    (@thehilliergroup)

    Thanks guys I’ll give that a try!

    Thread Starter thehilliergroup

    (@thehilliergroup)

    Well gentlemen, the page title in the browser bar still reads: “Seattle Real Estate Journal” instead of “Seattle Real Estate-Seattle Washington Real Estate”.

    Here is how the code appears in the header.php file:

    “<title><?php bloginfo(‘name’); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>”

    “<title>Seattle Real Estate-Seattle Washington Real Estate</title>”

    I assume this is what you meant by adding a static title?

    Any additional thoughts?

    niziol

    (@niziol)

    I wrote this code for my WordPress site to get better titles.

    Just place that (in the PHP code markers) at in your header.php template and place <?php echo $Title; ?> between the title tags.

    This produces titles like “Blah | Michael Niziol” etc. I’m sure if you remove all of the self-glorifying name references to myself, you could tweak it to your liking for your site!

    If that’s what your looking for, let me know if you have any issues and I’ll try to help you out.

    Good luck,
    Michael.

    @ thehilliergroup,

    In reference to my first reply to you – You can only have one set of <title></title> tags.

    Just try the one below and see if it helps:

    <title>Seattle Real Estate-Seattle Washington Real Estate</title>

    or you may try the more detailed approach given in the reply above this one.

    Thread Starter thehilliergroup

    (@thehilliergroup)

    Regarding Michael’s thread- What is the “That” you are referring to?

    niziol

    (@niziol)

    Pastebin seems to have misplaced it, very odd. You can get it here.

    Cheers,
    Michael.

    red-star

    (@red-star)

    try something like this
    –><title>yoursite.com ? titel,</title>

    The titel is what wil apear in the browser.
    Good luck

    Thread Starter thehilliergroup

    (@thehilliergroup)

    I have attempted to follow Michael’s thread but cannot very well. I have tried MAK’s suggestion. And I have tried Red-Star’s suggestion.

    None have worked.

    What now appears at the top of my page before the header is the code from Michael’s thread:

    “if (is_single()) {$Title=wp_title(”,false)”

    Even though I have restored the title code to the original:

    “<title><?php bloginfo(‘name’); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>”

    I cannot get the code to go away.

    So it appears I am making it things worse.

    niziol

    (@niziol)

    thehilliergroup,

    I appologize, something went very wrong with that .phps file I posted, it got rather butchered. I’m working on a plug-in, as the code is getting quite large and unruly.

    Contact me and I will e-mail you the code and/or the plug-in when its ready.

    Cheers,
    Michael.

    Hilliergroup…

    Just my opinion, but I think the code that Michael listed is not necessary. I would delete that and start over.

    The page title code should be included only in your header file (header.php). The only code you need to change is the title tag..

    <title></title>

    It often looks like this…
    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>

    Each of those php tags calls different information into the title tag. You can remove or reorder them as needed. You can even include regular text between them. You can get more info on WP tags here:

    A quick breakdown is
    <?php bloginfo('name'); ?> …This shows the name of your blog which you entered in the General Options panel

    *If you want every page to include “Seattle Real Estate-Seattle Washington Real Estate” you can simply enter this into the Weblog Title section on the General Options page. You could also delete this tag and simply add your text directly into the title tags.

    Another variation of this tag is <?php bloginfo('description'); ?> …This shows the description of your blog which you enter in the General Options panel under “Tagline”.

    <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> …This tells the browser to show the text “Blog Archive” whenever a single post page is being viewed. You can change the text “Blog Archive” to whatever you like.

    <?php wp_title(); ?> …This tag pulls the title of your post, page, category, etc depending on what’s being viewed.

    Having keyword rich page titles is important for SEO but you really want detailed titles. That will help broaden your chances of picking up variations of keyword phrases related to your topic. So I would suggest you at least include the wp_title tag along with your keyword text. You do want your most important keywords at the beginning of the title though.

    So taking this all into account here are two different ways you could edit your title tags to show your keyword phrase…

    1. <title>Seattle Real Estate-Seattle Washington Real Estate <?php wp_title(); ?></title>

    * This will show whatever text you include, plus the post/page/or cat title.

    2. <title><?php bloginfo('name'); ?> Keywords Here <?php wp_title(); ?></title>

    * This will show your blog title, plus any keyword text you include, plus the post/page/or cat title.

    My experience with SEO is that you don’t need to use multiple variations of keywords, if you include a keyword at least once search engines will put those keywords into different combos for you. So you could do something like “Seattle Real Estate Journal – Homes & Property for sale in Washington”. It would just depend on who you’re targeting and how many different related terms you want to pull in.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Want Page Title in browser to be different from Weblog Title in Header’ is closed to new replies.