Posted Post

Posted People, Posted Life.

Single "Category Permalink Structure"

What is SINGLE “Category Permalink Structure”?

Here is an example:

One of my blog category URL looks like this before:
http://fashion.postedpost.com/category/fashion-house/accessories/ties/

After single it, it will look like:
http://fashion.postedpost.com/category/ties/

Why we need shorter category permalink?

  1. Shorter is better, you know, size is always an issue.
  2. Change categories structure anytime without change urls
  3. Avoid duplicate content issue, because both of URLs are display a same webpage.

How to do it.

Find category-template.php in WordPress wp-includes folder, find this function: function get_category_link($category_id)

Comment the following lines:

//if ( $parent = $category->parent )
// $category_nicename = get_category_parents($parent, false, ‘/’, true) . $category_nicename;

(or get a plugin if you like)

Possibly related posts: (automatically generated)
Single "Category Permalink Structure"

No comments yet »

Your comment

HTML-Tags:
<a href="" title=""> <abbr title=""> <img alt="" align="" border="" height="" hspace="" longdesc="" vspace="" src="" width=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Alexa CounterFeedBurner Counter