Posts tagged “wordpress”

Repair WordPress image meta

There are times when things just go wrong. I had one of those times the other day. The pressure was on to deliver a project, and there were bits of PHP and CSS and JavaScript flying everywhere here at WebAware Central. And so it happened: I wiped the image attachment meta data in the WordPress database.

Get custom fields for WordPress post

WordPress lets you store custom fields on your posts (and pages, and custom post types that allow it). However, it gives them to you in a rather inconvenient manner, with your values mixed in with its own special fields and any plugin's special fields, and with values in an array. Here's how to easily deal with that.

Add shortcodes to WordPress Text widgets

WordPress comes with a few standard widgets, one of which is the Text widget. It's a fairly versatile widget that lets you add simple text or even HTML into any widget zone on your website. One thing it doesn't let you add is shortcodes. But it's very easy to allow the Text widget to accommodate shortcodes too.

How to hack a WordPress plugin that doesn’t have the filters you want

The best thing about WordPress, besides the fact that nearly anyone can edit a website built with it, is hooks. Filter and action hooks allow developers like me to customise a WordPress website in myriad ways. Many good plugins provide hooks too. But inevitably, you'll run up against a problem where you'd like a plugin to have a hook that it just doesn't have. You can ask the plugin author nicely to add that hook, and maybe they'll add it sometime soon, maybe even on time for your deadline. But what if your deadline comes before they add it?

Different thumbnail sizes for NextGEN Galleries

Ok, so we're allowed to have one (1) size option for thumbnails in all galleries, and they can be either cropped square, or not. This is my only option? But what if I want to have a gallery page of all of the lovely staff for my clients website, and their photos have been sensibly taken in portrait format, I do NOT want the thumbnails for this gallery to be cropped, that would be just wrong. And then there is to be a page with a photo gallery of the staff picnic where people have enjoyed taking happy snaps in both landscape AND portrait formats because that is what suits, so I need these thumbnails cropped.

Cleaning up WordPress plugin script and stylesheet loads over SSL

It's quite common to use WordPress as the host for an online shop, and that often means having an order page that needs to be encrypted via SSL. You don't want your customers providing credit card details or other sensitive information over an unencrypted connection! But many WordPress plugins don't take SSL into account, and merrily load scripts and stylesheets without encryption. Here's a couple of ways to fix this problem.