JQuery snippet: automatic highlights

Sometimes you want to highlight a word automagically without having to go through and manually add <span> tags all over the place. Of course you also want to do this without breaking anything else that has been wrapped in a <p> tag. Ahem, WordPress I’m looking at you. The first line of this iterates over […]

WordPress Basics: get recent featured images by category

Sometimes you want to have an image slider which not only contains the most recent images on your site but does so by category to ensure that all of the categories on your site are included: First get the categories: [code lang=”php”]$categories=get_categories();[/code] By default this returns the categories in alphabetical order and ignores any empty ones. […]

WordPress hacking: display only future posts

I recently inherited a WordPress site which uses a future posts plugin to allow you to publish posts with dates in the future. This is great and a very simple solution for sites that list events but don’t need complex calendar functionality. However, it had no way of automatically removing events listings which were now in […]

WordPress tomfoolery

I was recently asked to make what was effectively a sub-site within WordPress, so mybrilliantsite.com/apparentlydifferentsite, given that WordPress is generally setup to do a single site (with corresponding site title) per install (WordPress multiuser is intended for sub-domains) this required a little bit of fiddling (and a child theme, or self coded theme). NB, I am predominantly […]