How to set up SEO metadata inside WordPress without the use of a plugin

Posted in Wordpress by Alex | Tags: code, seo metadata, wordpress seo
WP Greet Box icon
Hello there! If you are new here, you might want to subscribe to the RSS feed for updates on this topic.

Everybody loves SEO, and everybody loves to have a well read blog or website. In the digital world having a well read blog is not all about writing cool, original and unique stuff. You need to make a sacrifice to the all mighty god known as Google, and that sacrifice is known as SEO.

Wp-seo-thumb

Here is how you can set up some really nice features inside your wordpress blogs, whouth the use of plugins, just only clean harmful code. These tips can make the difference between your blog and your neighbours blog, so follow them closely.

To understand the basic of search engine optimization you need 3 things: a post description, post keywords and some very nice URL set up.

How to embed a meta description inside a wordpress template

First open up your header.php file inside your theme folder, and just after the title tag insert this variable:

 
<meta name='description" content="
    <? if(is_category() || is_archive()) {
        echo the_excerpt();
    } else {
      echo "This is my default description to use if a post or page doesn't have an excerpt";
     } ?>
    " />

This is the description mini-loop, to use simply write a description in the post excerpt inside the post creation section of the wordpress administration.

How to embedd the keywords inside a wordpress theme

Open up your header.php and after the meta description tag we reentered before just paste in this code:

<meta name="keywords" content="<?echo single_cat_title("");?>, <?echo     single_post_title("");?>" />

This will insert the category title and the single post title as keywords for your post so make shure you write relevant stuff in the two titles.

How to set up search engine friendly URL-s in WordPress

Just make your way inside the wordpress administration -> Settings -> Permalink and insert this variable inside the custom structure field: /%category%/%postname%.html

And you have a decent SEO optimized blog. Just make shure to write relevant and unique stuff inside the excerpt and the title sections. The rest is up to you.

Want to automate things?

Just download All in one SEO pack and let the work be done for you.

Reader Feedback

Quote from Cosmin
I would add to the permalink structure: if you don’t really care about using categories in your URL, you can disregard the %category%

Why?

Having %category%/%postname%.html basically buries your page in one folder (or more, if you’re in a subcatecory) : example.com/category/pagetitle.html

Google for example will consider links that are closer to the root of the site to be more important : example.com/pagetitle.html

I’ve seen this done on major blogs and it seems to help. Of course, this is not a decisive factor – just an idea that in some cases I’ve seen to help.

You may be interested in these also:

4 Comments to “How to set up SEO metadata inside WordPress without the use of a plugin”

  • Nice tips, thanks for sharing.

    I would add to the permalink structure: if you don’t really care about using categories in your URL, you can disregard the %category%

    Why?

    Having %category%/%postname%.html basically buries your page in one folder (or more, if you’re in a subcatecory) : example.com/category/pagetitle.html

    Google for example will consider links that are closer to the root of the site to be more important : example.com/pagetitle.html

    I’ve seen this done on major blogs and it seems to help. Of course, this is not a decisive factor – just an idea that in some cases I’ve seen to help.

    Thanks,
    Cosmin.

  • [...] post: How to set up SEO metadata inside WordPress without the use of a plugin | Design strike Comments0 Leave a Reply Click here to cancel [...]

  • As a fellow webdesigner , I’m truely glad to find that someone brought up this topic.

    All too many people out there just don’t grasp the concept of what all is required in this industry, and I think also we’re many times underrated
    or taken for granted. Never the less I’m very glad to see that you feel the same way I do , thanks so much for your blog!

  • [...] This post was mentioned on Twitter by Christophe Delire. Christophe Delire said: How to set up SEO metadata inside WordPress without the use of a plugin | Design strike: http://bit.ly/bIjTpL via @wordpress [...]

Post comment

CommentLuv Enabled