Posted Post

Posted People, Posted Life.

Archive for web

Download StatCounter Log as CSV Function

Today I introduce you a very powerful asp/vbscript function: kDownloadStatCounterLog

Input:

Output:

An CSV text string, you can use CSV2Array function change it to an array

Read the rest of this entry »

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)