WordPress – using short codes within 404 page

Just a trick I just figured out – I installed a sitemap plugin for wordpress and wanted to drop the rendered sitemap into my 404 page.  The short code for the plug was [ slick-sitemap ].  So, in my 404.php page within my theme directory, I just added this :

<?php echo  apply_filters(‘the_content’,'[slick-sitemap]’);?>


that’s, well, slick 🙂


My top 5 wordpress plugins

404 Redirected – coupled with SEO Ultimate, allows you to catch 404 errors (ie – outdated bookmarks) and link them to the correct content.

Akismet – comes bundled with wordpress and for good reason.  Best anti-spam tool I have found for wordpress.

Better WordPress Minify  – awesome at reducing the number of HTTP requests your site generates.  combines all JS into 1 <javascript> tag, and all css into a single tag.

Contact Form 7 – simple contact form to email processing plugin

 SEO Ultimate – This one is helpful, not just for SEO but for general site management.  Has a 404 tracker as well as allows you to defined per page custom titles, meta descriptions, and keywords.


Midori Browser – Moving the New Tab button

I am running the Midori browser inside of Cygwin-X at work.  This allows me to browse and download within Cygwin easier, as well as bypass some of the security imposed on the network at work.

One thing I have found that I absolutely hate is the order Midori puts its task buttons in.  The first button on EVERY other browser is Back – Midori uses “New Tab”  – WTF?!  I find myself clicking “New Tab” meaning to go back.  This has got to go!

I found that the easy fix for this is by editing the configuration file.  On Cygwin this file is located in .config/midori/config

Make sure you exit out of Midori, then open the config file in vi.  The line to look for is toolbar-items=.  I moved TabNew from the first entry to the last.  Saved the file and then restarted Midori.


Upgrade your ESXi vmtool isos

Need to update the vmtools in your ESXI 4.0 server?

You can download the ESXI 4.1 ISO updates free from VMware. Log in/Register at https://www.vmware.com/tryvmware/index.php and then look for “VMware Tools CD image for Linux Guest OSes” and download the ISO image.

You will have need to enabled SSH on your ESXi host before this – as well have enough disk space to accomodate this file. The new linux.iso is more then 2X the old and I had to pull all of the unused iso’s (linux.iso, freebsd.iso, netware.iso, solaris.iso, and winPre2k.iso) off my ESXi host to make room.

Once I have replaced linux.iso with the new file, a new file signature also needs to be generated.

I did not find the original private key this was signed with, but its easy to generate a new private/public key pair and resign all iso’s if needed.

You will find the iso images in the following directory:


Using openssl you can generate the private key:

openssl genrsa -out tools-priv.pem 2048

using the private key you just generated, we can now recreate the tools-key.pub that ESXi verfies the iso images against:

mv tools-key.pub tools-key.pub.orig
openssl rsa -in tools-priv.pem -pubout -out tools-key.pub

Now we can recreate the linux.iso.sig

openssl dgst -sha1 -sign tools-priv.pem < linux.iso > linux.iso.sig

Now you should be able to install/upgrade all of your Vmtool’s with this latest and greatest version.

WordPress – Squash Spam Comments

A quick and easy way to squash the damn WordPress Spam bots.


First step is to turn off comments on all of your posts using the following SQL query:

UPDATE wp_posts p SET comment_status = ‘closed’, ping_status = ‘closed’ WHERE comment_status = ‘open’;

* Note you may have to adjust the wp_posts table name to suit your install.

Second step:

The default comment and ping status is open on all new posts – change the default to ‘closed’ with the following 2 queries:

alter table wp_posts change comment_status comment_status varchar(20) default ‘closed’;
alter table wp_posts change ping_status ping_status varchar(20) default ‘closed’;

Again, you may need to adjust the wp_posts table name to your install.



Joomla – Editing “Advanced Attribs” from Front end

I have run into a project that requires attaching some addition “Advanced” attributes to Joomla articles.

I have extended the “blog category” menu type to incorporate jQuery to display the blog category with the titles as vertical tabs, and the introtext displayed in a content div when each tab is clicked.

Articles selected for this vertical tabbed menu will also have an associated “menu image” and a “video file”.  The menu image will be a thumbnail that gets displayed in the tab, and the video file will be a flv video that is used to populate (using javascript) a fixed video player that will appear in another module position on the website.

Continue reading