This code enables you to link any single post entry title to any URL. The URL you add doesn’t need to be an external URL. It can be another URL on the same WordPress installation.
There’s 2 simple steps you need to take:
- The 1st step is to copy & paste the code into your child themes functions file.
- The 2nd step is to create a custom field named external_link and add your link to the value field like you see in the following image:
If you don’t use the custom field, the post will link to the default permalink.
Prefer a Plugin?
Mark Jaquith, the lead developer of WordPress, has coded a popular plugin named page links to.
Here’s the code for logged in members: