I’ve been working on some interesting projects for the past few weeks.
The first one is the website for the Society of architects of Split (Društvo arhitekata Splita – DAS). My job was to code the layout and choose a CMS. I decided to go with WordPress because the site’s structure isn’t too complex and, except for two categories, it’s mostly just static pages.
I did encounter a few difficulties along the way, but nothing that wasn’t fixable. Most of the pain was caused by the ever popular “/category/” feature of WordPress, which inserts /category/ in the URL if the the page is a category index. While you can access those pages without the /category/ in URL if you’re using a custom permalink structure (such as “/%category%/%post_id%/%postname%/”, for example), the problem starts when your post count per page exceeds 10 (or whatever custom number of posts per page you choose) and you need to go to page 2 of that category – it returns a 404 error. I fixed this problem with a handy plugin called “Redirection“, which made it possible to rewrite “/category/category_name/page/number/” to “/category_name/page/number/”. I tried placing the rewrite rules directly in the .htaccess file, but, for some reason, that didn’t work.
Second problem was adding custom metadata to posts in a way that would make sense to a site editor. For that purpose, I used the rc:custom_field_gui plugin which was a breeze to use :)
Third one, that gave me two days worth of headaches, was how to display only posts with certain metadata on a category index page. First I used the officially recommended way, which consisted of using PHP’s continue statement to filter out the unwanted posts. That produced a empty page 1, and a populated page 2, because WordPress post count occurs before the continue statement. There’s also no way to do it with WP_Query, so I ended up writing a custom query. Again, problem with pages. I used the WP-PageNavi plugin, so I looked at its code and figured out what variables it needs to work properly and I gave them the values they needed.
I can only say that I’ve learned a lot about how WordPress works :) And while it does have its quirks, if you know some PHP, anything is doable.
Second website is for a well known Croatian bottled water, Studena. Again, Blackduke was the one who produced the website and I was asked to compose some background music and a few sound effects. The first version of the music was initially accepted, but then it was agreed that something that currently plays on the site would work better. You can hear and download the first version from below :)
- Studena music – 01:42Download: MP3 (1,602 KB)
In other news: wish me luck because I’ve got three exams next week. And that’s it. If I pass all three, I get to start working on my master’s thesis.
Future awaits :)