Optimize your WordPress theme for SEO

One of the things you should care about when starting a WordPress blog is the SEO (Search Engine Optimization).

SEO is what will say to Google, Yahoo how important is your content.

Today we are going to set some XHTML tags in our template code:

1. Index.php (home)

– Use the H1 tag in the blog name / logo.
– Use the H2 tag for the post title.

Something like:

2. Single.php (post page) & Page.php (static page)

Here we must tell the spiders that the post title is the most important part of the page.

– Use the H1 tag for the post title

3. Archive.php (Category, Tags, Years… page)

You can follow the Index.php advices.

After apply this tags you have to pass the W3 Validator. Like this blog does.
It is not necesary to validate every page of your blog (but would be nice). At least do it for the home page and the single post page. A clean output code means better SEO.

Now its your turn. What your advice to Optimize a WordPress theme?

Tags:

10 Responses to “Optimize your WordPress theme for SEO”

  1. Jexweber March 15, 2010 at 1:23 pm #

    Good tricks Quicoto, my blog has been indexing better in google when i aplied this parameters.

    • quicoto March 15, 2010 at 1:27 pm #

      First comment in this blog. Thank you 😉

      I will write more post about SEO as soon as I can.

      Stay in touch.

      Regards.

      • Jexweber March 15, 2010 at 1:42 pm #

        Ok, i’ll go to subscribe your feed. ;-P

  2. Juldavs March 17, 2010 at 1:23 pm #

    Interesting post.
    will apply these parameters to my new template (under construction) 🙂

    thanks

    ooohhh my first comment in English!! jajaja

    • quicoto March 17, 2010 at 1:25 pm #

      I’m glad you posted it then 😉

      Looking forward to see that “under construction” theme 😛

      • Juldavs March 17, 2010 at 1:30 pm #

        jajajajaaj it’s a good name 😛

  3. JMLeon May 18, 2010 at 4:39 pm #

    I’m developing a new theme for Viajar sin Destino and Travelling Lost sites and in Index.php i’m using h1 for the site description instead of for the site title which is almost irrelevant for search engines. This way I can use my site description as something more important than just a quick tip about the site.

    • quicoto May 18, 2010 at 7:58 pm #

      Well I don’t know how it should be.

      I think it just depends in what you want. And yes, like you said if you want to highlight the description put the H1 right there.

      Thanks for commenting 😉

  4. Petehds May 28, 2010 at 10:12 pm #

    Can this be used in bbPress?

    • quicoto May 29, 2010 at 2:24 am #

      No, the file structure is diferent from WordPress and bbPress.

      What you can do is modify the h1, h2 and h3 from the front-page, topic and other files.

      I’ll try to make a post about it soon.

      Stay in touch.

      Regards.

Leave a Reply

Add <code> Some Code </code> by using this tags.