There are many tips, tricks, hacks and so on that exist for tweaking and adjusting various functionalities in WordPress and while I’m not sure whether the subject of this post falls into any of these categories, it should still be helpful to one or two bloggers out there. The fact that many Web designers out there also use WordPress as a content management system (CMS) means that ways have to be found to carry out what could be described as straightforward actions in other CMS’s such as Joomla. Take for example, the problem at hand – how do you point a menu item to an external link instead of a page, in WordPress?
What to do
Normally, desperate problems are said to call for desperate measures, but in this case a simple problem requires a simple solution. Thus, to point a menu item to an external link in WordPress, there are two basic approaches you can take:
- In the title input area, enter the following:
[sourcecode language=”plain”]<a href="Enter external URL here">Menu Item [Space]</a>[/sourcecode]
- Alternatively, you can take the second approach that comes with the new of WordPress 3.0. Although your current theme must natively support menus, WP 3.0 does make it a lot easier to customise menu items without the use of plugins. First, from the Dashboard go to Appearance then Menus.
Then create and save a custom menu to add your links to (you can also edit, delete or re-arrange links in the custom menu). Once the custom menu has been created, simply enter the URL of the external page in the Custom Links option (on the top-left-hand-side), enter the name of the menu item in the Text field and click on Add to Menu. Do not forget to save changes at when you finish adding as many custom links as required.
Do you agree with the concept of using WordPress as a content management system?