How to make WordPress more like a CMS

David Nash wordpress 0 Comments

WordPress is wonderful for its core functionality – blogging. And it’s pretty good for other stuff too, but sometimes it takes a little shoe-horning to get it working like a real CMS. I recently used the Advanced Custom Fields plugin and it’s excellent. As a developer I can set up fields that only apply to specific pages, and then use those fields in the themes I develop. My clients then have a simple, easy to use interface for entering single lines of text, or selecting images, or… basically anything you can think of. To make it really powerful, you need …

Dynamic Font/Image Replacement in Silverstripe

David Nash silverstripe, What I'm Working On Today 15 Comments

I’ve recently started creating sites with SilverStripe CMS, and I’m loving it. My client wants nicely rendered non-standard font titles that fade in and out, without using javascript. Here’s how I’m going to accomplish it: In Silverstripe’s mysite/code/Page.php I overload the onBeforeWrite() call in my Page class. This intercepts the data before it is written to the database. I can get the title of the updated page from $this->Title I will then use PHP’s GD (graphics) library to create a PNG with a transparent background. I’ll use imagettftext() to load a font from a TTF file and write it to …