During my escapades with WordPress and various templates we’ve put together and worked with, I’ve discovered an interesting problem with a number of the DHTML menus that are generated from the WordPress categories or pages (using wp_list_categories or wp_list_pages).
If you have a hierarchical page system (which this blog does not, but www.kabarty.com.au does – and performs a nice demo site for my plugin!) then it may very well be that the item that forms the top menu item (in the case of Kabarty’s site, almost all of the top menu items) is not actually a page you want people to be able to visit – but WordPress forces all Categories or Pages to be clickable links when they’re returned through wp_list_categories or wp_list_pages.
Take for example the following menu structure;
|Home||Marketing & Design||Company|
| ||Web Site Design||About Us|
It’s highly likely that the menu items Marketing & Design and Company do not need to have pages of their own, but because the DHTML produces a drop down menu, they still need to be clickable links, so that the menu will drop down when you hover over the top.
This is where my plugin comes in. It will alter the destination urls for the top menu items (ie, Marketing & Design and Company) so that instead of going to a page they actually just go to ‘#’ – which most browsers will simply ignore when you click – but still allows the browser to display the drop down menu when you hover over the item.
To install the plugin, first determine if you’re working with categories or pages, and then download the appropriate plugin below. Install it into your WordPress installation in the normal way. Go to your Administration for WordPress, choose Filter Top Menu under the Settings and enter the page/category numbers of the pages/categories that you wish to not have actual pages. It’s that simple!
Filter Top Menu
If you have any questions, please just ask!
Aside from the obvious Buy A Mac quotation that one might expect, I felt it necessary to outline some of the things people with a PC running a variant of Microsoft Windows can do to reduce their likelihood of contracting a computer virus or trojan.
In my recent experience, most ‘viruses’ actually turn out not to be viruses at all but are in fact either trojan horses or some kind of other malware. Usually adware. But since most people know the term virus, and apply it to all kinds of malware, that’s the term I have used here.
So, what are the steps to reduce your exposure?
- If you’re using a version of Windows earlier than XP on your desktop PC and you use the internet, upgrade it. This may mean having to upgrade your hardware but it will be worth it. Anything earlier than XP (ie, Windows 95, Windows 98, Windows ME) is no longer supported by Microsoft and no more patches will be released to fix known exploits. And if you’re on Windows ME you really will enjoy an upgrade, trust me.
- Keep your PC up to date with Windows Updates. This can’t be stressed enough. If you do nothing else, you must keep your system up to date.
- Avoid downloading ‘pirated’ music, programs and films.
- Avoid the more seedy areas of the internet. This includes those areas that you can find things from #3 above, but also the even seedier places where you will find nude women / men. Like in real life, unsafe places will get you into trouble, often in more ways than one.
- If you want to download freeware/shareware/try-before-you-buy-ware then check it out on Google first. And don’t take Google’s first words for it – some of the newer trojan/spyware laden programs create fake web pages saying how great the software is – make sure you look for reviews of the software at various different places – and if possible stick to known good review sites such as cNet and zdNet.
- Don’t open attachments in e-mails unless you asked for them to be sent. Even if the person is in your Address Book, or you know them personally. Unless they told you in person or on the phone to expect this, then it could easily be a virus pretending to be your friend. If you’re sending an attachment to friends, call them first, or include something in your e-mail message that a virus could not know. Maybe a recent event that you haven’t entered into your computer is a good idea, such as ‘It was good to see you last Saturday at Uncle Joes fiftieth birthday party’.
- Don’t click on links that friends send you on Instant Messenging programs – unless the person sending the link can say something to convince you that they really did send it. See #6 for more on this.
- Don’t click on links in e-mails. In particular if the e-mail says it’s come from your bank, or Paypal or eBay. These are almost always scam e-mails trying to get you to visit a dodgy site. If you get an e-mail and think it might be from your bank, or eBay, then open your browser yourself and type the address into the address bar yourself. Do not click the link.
- Finally, install a reputable anti-virus solution and keep it updated. Good examples of this are Avira, AVG and Avast. However, if you don’t follow the other 8 principles, you are still at risk. It’s a cat and mouse game for virus/antivirus and if you’re the first person to see a virus in the wild, your anti-virus program cannot help you.
It should also be said, if you want a simple life and don’t want to waste half your horsepower and internet bandwidth with antivirus and antispyware solutions then I really do recommend looking at Apple Macintosh as they’re very easy to use, very reliable and do not suffer the same architectural flaws that Windows machines have. I expect to be burned in hot oil for making such a statement. And people will say ‘Of course Mac doesn’t have as many viruses because it doesn’t have the market share’ but whilst this is possibly part of the reason, Mac also has been built with a number of protections by virtue of its UNIX background.
I thought I’d just drop a note on here to say that upgrading from WordPress 2.5 to WordPress 2.7.1 was an absolute breeze.
I followed the instructions at http://codex.wordpress.org/Upgrading_WordPress and to be honest it could not have been easier. I moved the original directory and unzipped the downloaded file, then copied across my theme.
To be fair I had no plugins installed previously, so that may have made it a little easier. But I have some plugins now 🙂