Creating Custom Taxonomies

December 2, 2010

Custom taxonomies for tags in default is always be like this e.g http://www.yourdomain.com/tags/yourtag/ .You can choose whether your tags being indexed by the search engine or no.You can simply doing that by setting up your wordpress based site with All in one seo plugin.Making your tags indexed can help to improve your seo but in the other hand it will make you get more chance to be penalized because of duplicated content or manipulating keywords only.

Making a relevant or good tags is the solution.Just make sure your tags is not the same as your meta data,description or keywords.By this,i think we will be just fine and fact it can help us get a better result in seo if we make a relevan tags.

You can add this code to your theme function.php file

function create_my_taxonomies() {
register_taxonomy('creativity', 'post', array(
'hierarchical' => false, 'label' => 'Creativity',
'query_var' => true, 'rewrite' => true));
register_taxonomy('subjects', 'post', array(
'hierarchical' => false, 'label' => 'Subjects',
'query_var' => true, 'rewrite' => true));
}
add_action('init', 'create_my_taxonomies', 0);

So the result is you can see additional custom taxonomies in your post editor page in the admin area.You can  choose what custom taxonomies to be appear.If you want it to appear in post add this code to your single.php theme file

<?php wp_tag_cloud(array('taxonomy' => 'creativity', 'number' => 19)); ?>

Where 19 is the numbers of tags you want to be shown.You can add more line with various taxonomies but don’t go overboard,it could slow your site’s load time.To display all the tags,set the number to 0.You  too can show this in your main page by adding the code above in main-index.php ussualy.

When i fill the field “subjects” with my own tags e.g touch,art etc. so the permalink will be http://www.akbar99.com/subjects/touch/ and so the rest.You can also add many more custom taxonomies,i just made two like in the screen above for example.If you wanna do this to improving seo ,make  you are setting your tags to be indexed.But if you don’t,you still have a pretty custom taxonomies and permalinks for tags archieve.

In short words your tags is have to be different from :

-your keywords

-your description

-other meta data

Your tags also can be :

-your secondary keywords

-relevant words to the post

Okay,you can have a try :)

Note : This is my repost extracted from Google web cache,because I lost some of my post during the bad day .

This post was modified.

Leave a Comment

Comment will not appear untill approved.Thanks for waiting.You can use these HTML tags and attributes:<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post:

Next post: