How to Create New Permalink Rules

In WordPress, you can easily create a pretty URL by going to the Settings -> Permalinks section and update the permalink structure. However, if you are creating your own themes or plugins, there are times when you need to create a custom permalink structure.

For example: you want to implement a permalink: http://your-site.com/movies/1 which translates to http://your-site.com/index.php?movies=1.

Here’s how you do it:
Continue reading

How to Redirect a Page/Post to External Site

external-linkUsually when you publish a new post, the post will be pushed to the top of the list in the front page. When your reader click the title link, it will bring them to the full article. Now, what if you want the title of the post, when clicked, direct the reader to an external URL instead of the full article? How can you do it without utilizing a plugin?

We can use custom field to solve this. Here is how you can do so:
Continue reading