Today I will show how to play with wordpress permalink. If you are just working with a fresh wordpress installation then certainly you need to do some work with wordpress permalink structure. Just check in admin left menu Settings->Permalinks
Here is first look of your default permalink structure. Check your post and page url is like:
Post: http://sitename.com/?p=N, where N = post id
Page: http://sitename.com/?page_id=N, where N = page id
Category: http://sitename.com/?cat=N , where N = category id
Tag: http://sitename.com/?tag=TAG SLUG, pls check bellow what is slug
Author:http://sitename.com/?author=N, where N = author id
Now, let’s change the permalink structure to any custom format… here I am choosing the Month and name format and see screenshot bellow
Oh, check another thing before and after changing permalink structure,if you are in edit more of any post or page, check bellow the subject box
For default permalink: there is a option “Change permalinks”
For custom permalink: there is a option “Edit”
Check the screenshot bellow:
Please check here what we are editing or getting automatic after saving first time(or auto save) the post … is called slug for that article, we use article name alias for joomla same way. if seo enabled in joomla then that alias is used. Ok ,now check after changing permalink to any custom format what happened to all permalinks like posts, page, author, category, tags etc. Let’s check
Post and Page will get as the screenshot above (example http://localhost/blog/2010/01/playing-with-wordpress-permalinkslug-quick-seo/)
Category: http://localhost/blog/category/category slug/
Tag: http://localhost/blog/tag/tag slug/
Author: http://localhost/blog/author/author username(nick name) is here/
Check here for category,tag, author etc the bold part we are telling base like catgory base, tag base or author base. and the italic part is slug, Sometimes that base is also called slug for simplicity.
Making post link .html
If think you cheked some wordpress site has post link as .html … more like static and more friend for google .. I mean search engines. No worry, it’s just easy. Put a .html in the custom permalink format of your post.
Just write this in custom field
and my current blog post url is now
Making the url more short
I think now our url got too long and sometimes that is bad for serach engines. So while we write blog post we can keep the title long(not more than 160 may be… 160 length is good for search engines) but we will edit post or page slug as short as possible. That the trick … taking specially care as do for your girl friend or your baby.
Oh another way we can make the url short… let’s change the permalink again. Let change custom permalink as
and my post link is more short now
for news site we can use like this
now link is like
So I think we played too much with post permalink and now we know how to change the post permalink as we need. Isn’t it easy ?
Chaning page link to .html
There is no easy way to change page link .html like post from wordpress but we can do it via a plugin, acutally wordpress has that support to change permalink for page or others … so plugin authors can hack easily. To change page link like .html you can use this pluginCustom Page Extensions
Working with Category,Tag and Author base
Let’s play with category and tag base that is available in wp permalink.
So now tag link be like
Hei we are not finished yet. How about removing category base from category permalink ?
let me explain if you don’t change category base that means default is “category” then
and for child cateogory
http://sitename.com/category/parent category slug/child category slug
and now what I want to do is like bellow
http://sitename.com/child category slug
Yes we can do that I mean remove category base using plugin. I like to use No category parents. I have tested in a client’s site and it’s working fine.
Yap we can change author slig(base actually) too ,,, not remove, just change default author base “author” to any custom word like “blogger”, “contributors” etc.
Heh heh talked too much today. I will recommend you to use another two plugins
Note: Check this post in bengali in amaderprojukti forum from here.
thank you for having patience to read this blog. Don’t forget to click share in social network and I like donation(check right col donation box :D)